Hi Team,
My string value str=“Betti-Ann Lavitt”
but I need output as like output=“Lavitt Betti-Ann”
please help me on these team
Regards,
Saikrishna
Hi Team,
My string value str=“Betti-Ann Lavitt”
but I need output as like output=“Lavitt Betti-Ann”
please help me on these team
Regards,
Saikrishna
Can you send C# code
Hi @rlgandu ,
can you send the C# format
Here is simple approach can handle any length of the string.
strOutput = String.Join(" ","Lavitt Betti-Ann".Split(" "c).Reverse)
Thanks,
Ashok
output = string.Join(" ", str.Split(' ').Reverse());
Hi,
How about the following?
String.Join(" ",str.Split(" ",StringSplitOptions.RemoveEmptyEntries).Reverse())
Regards,
original = "Betti-Ann Lavitt";
reversedWords = String.Join(" ", original.Split(new[] { " " }, StringSplitOptions.None).Reverse())
Regards
it’s worked.
Thankyou @Yoichi
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.