G
Guest
I am just wondering if there is a C# equivalent to the VB StrRev function? I
have
written my own, but was wondering if there is a built-in way?
JRB
have
written my own, but was wondering if there is a built-in way?
JRB
I am just wondering if there is a C# equivalent to the VB StrRev function? I
have written my own, but was wondering if there is a built-in way?
Jon Skeet said:I am just wondering if there is a C# equivalent to the VB StrRev function? I
have written my own, but was wondering if there is a built-in way?
It would help if you'd say what StrRev does, but guessing that it
reverses a string, the easiest way (IMO) would be:
char[] chars = original.ToCharArray();
Array.Reverse(chars);
string reversed = new string (chars);
I apologize for not being clearer (I just thought everyone knew that one).