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

  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
    Chappell Hill, Texas
    Posts
    2,332
    Mainframe assembler programmer by trade. C coder when I can.

  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, 08:18 PM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  4. Replies: 6
    Last Post: 04-21-2006, 08:49 PM
  5. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM