Thread: Convert a string to upper case?

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    4

    Convert a string to upper case?

    Is there a simple way to do this? toupper does not convert an entire string but just a single character so that doesn't work. What I am doing is having a client send a message to a server which should convert it to upper and then send it back. I have everything except for how to convert the string. Any help would be appreciated.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    for( x = 0; mystring[x] != NULL; x++ ) mystring[x] = toupper( mystring[x] );

    "Use the force, Luke."

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    4
    Thanks. I got it figured out actually now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 03-05-2009, 11:32 AM
  2. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  3. Calculator + LinkedList
    By maro009 in forum C++ Programming
    Replies: 20
    Last Post: 05-17-2005, 12:56 PM
  4. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM
  5. error with code
    By duffy in forum C Programming
    Replies: 8
    Last Post: 10-22-2002, 09:45 PM