How can we check if a string 'Ra' appears at index 1 in a given string. If it appears return a string without 'Ra' otherwise return the original string.
Sample Input:
"Ram"
"Rat"
"Coding"
Expected Output:
m t Coding
How can we check if a string 'Ra' appears at index 1 in a given string. If it appears return a string without 'Ra' otherwise return the original string.
Sample Input:
"Ram"
"Rat"
"Coding"
Expected Output:
m t Coding
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Nov 14, 2022, 2:46 PM
Have not tested but it should work, please test this
Amit MohantyPosted Nov 14, 2022, 2:30 PM
Try
this