Thread: chr convert from small to captial

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    3

    Question chr convert from small to captial

    how would i convert a small chr at the start of a string into a capital with out converting the rest of the letters after the first into capitals as well ?

    thanks newbie
    Last edited by hlens; 11-08-2001 at 05:01 PM.

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Use toupper() - include cctype and csdtlib -

    char a[]="zen";
    a[0]=toupper(a[0]);
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. convert double to string problem
    By gandalf_bar in forum C++ Programming
    Replies: 6
    Last Post: 03-15-2004, 05:14 AM
  2. Convert Char to Int Function
    By drdroid in forum C++ Programming
    Replies: 9
    Last Post: 02-19-2003, 12:53 PM
  3. yhatzee, small straight
    By uglyjack in forum C++ Programming
    Replies: 2
    Last Post: 06-13-2002, 03:09 AM
  4. Small app ideas
    By dirkduck in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-15-2002, 08:57 PM
  5. FAQ chr convert from small to captial (C++)
    By hlens in forum FAQ Board
    Replies: 1
    Last Post: 11-08-2001, 05:05 PM