473,473 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Something like StrRev?

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
Nov 15 '05 #1
3 6133
<<jrb>> wrote:
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);

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
I apologize for not being clearer (I just thought everyone knew that one).
Thanks.

jrb

"Jon Skeet" <sk***@pobox.com> wrote in message
news:MP************************@10.1.1.14...
<<jrb>> wrote:
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);

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 15 '05 #3
<<jrb>> wrote:
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 :)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Martin Lucas-Smith | last post by:
I am trying to take a string and split it into a filename and a number where the number is what follows the *last* instance of a comma in that string. Split and explode won't work because if the...
8
by: Sam Sungshik Kong | last post by:
Hello! I use Python for ASP programming. I found something weird. Response.Write(Request("something")) It draws "None" when there's no value for something. Actually I expect "" instead of...
7
by: tuchka | last post by:
Hi, guys! I am very new here and just started to learn C. I have previous java exp. however. I'm abs. stuck on pointers and i'm unable comprehend algorithm of simple program that reverses chars...
44
by: Tolga | last post by:
As far as I know, Perl is known as "there are many ways to do something" and Python is known as "there is only one way". Could you please explain this? How is this possible and is it *really* a...
5
by: Daniel Vukadinovic | last post by:
Can anyone explain me these things in C++? 1.What is :: used for like in the next case: if(.... { ... ::one;
7
by: cj | last post by:
I'm sure it's simple but it's new to me I can dim x as new something which defines x as a new instance of something in one statement. I can also dim x as something then later make x = new...
4
by: D.Hering | last post by:
When I see something like this prototype: SOMETHING int func( int x ); what is SOMETHING doing there? thanks very much, -Dieter
2
by: Andrew Backer | last post by:
I hope someone out there can help me with this, because I am stuck. My problem is that I have an instance of a generic class, but I don't know ahead of time what the type parameter used was. In...
5
by: Ayebaleet | last post by:
Hello everybody, I understand the basics of Java, but not such features as are helpful in an applet namely Listeners. I wanted to create a feature like this: A program would be displayed in...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.