For each item entered by the user, I want to print with space between characters
for example - Bangalore
the output should be -
b a n g a l o r e
For each item entered by the user, I want to print with space between characters
for example - Bangalore
the output should be -
b a n g a l o r e
Hi,
Can you try the following expression?
String.Join("",yourString.Select(Function(c) c+" ")).Trim
Regards,
thankyou so much, it worked. can you please explain me the code as well.
Another way to do it is to use ToList(). It splits the string to a list of chars that you then can join to a string with a space in between them.
String.Join(" ", str.ToList)
thankyou
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.