Something like StrRev?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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).
Thanks.

jrb

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).

Probably all VB programmers do - but not everyone who reads the C#
newsgroup is a VB programmer :)

Anyway, I assume I guessed correctly :)
 
Back
Top