C Board  

Go Back   C Board > General Programming Boards > FAQ Board

 
 
LinkBack Thread Tools Display Modes
Old 11-08-2001, 04:37 PM   #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.
hlens is offline  
Old 11-08-2001, 05:05 PM   #2
zen
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
zen is offline  
 

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wiki FAQ dwks General Discussions 192 04-29-2008 01:17 PM
about: FAQ > How do I... (Level 2) > How can I convert a char/string to upper or lo dfriederich C Programming 2 09-20-2006 05:40 PM
FAQ Check/Lock RoD A Brief History of Cprogramming.com 2 10-15-2002 11:21 AM
FAQ how do i convert a string to an integer?? (C) Unregistered FAQ Board 1 12-02-2001 05:03 PM


All times are GMT -6. The time now is 07:41 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

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