how to iterate through each character in a string?
My requirement is -
I want to iterate through the string to find some particular characters and then want to replace it with some other character. This string also contains newline characters in between. In the string below, I want to remove newline characters and replace it with single space and want to change all the occurences of character "r" with "s" How can I do this?
String = "This is a sample test string.<newline character> This should work. <newline character> Please try it out."
Please let me know. Thanks in advance.
Thanks for the updates.
I have tried using array but no success.
I have also tried "Replace" function as well but not able to replace newline characters with space. How can I do that?
Any thoughts on this plz.