Is there a good function for reversing the order of characters in a string?

This is a discussion on Is there a good function for reversing the order of characters in a string? within the C++ Programming forums, part of the General Programming Boards category; I need to reverse the order of characters in a string, and I was wondering if there was a good ...

  1. #1
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827

    Question Is there a good function for reversing the order of characters in a string?

    I need to reverse the order of characters in a string, and I was wondering if there was a good function to do this with, or if I have to write my own.

    Thanks.

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  3. #3
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827

    Thumbs down

    Quote Originally Posted by Dino View Post
    Thanks, but I did not find any function in that wiki for reversing the order of the characters of a string, though perhaps I missed it...

  4. #4
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827
    Hmm...a quick Google search turned up this link:

    Reverse the order of all characters inside the string : string reverse....string....C++ Tutorial

    I think its what I'm looking for, though I'm open to any other suggestions.

  5. #5
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827

    Thumbs up

    Quote Originally Posted by Dino View Post
    Ok, that link does contain something for that after all:

    reverse [C++ Reference]

    That is definitely what I'm looking for. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 09:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 12:45 PM
  3. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 02:02 AM
  4. Replies: 6
    Last Post: 04-21-2006, 09:49 PM
  5. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21