Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ALL CAPS 2 Title Case

Status
Not open for further replies.

vetten

IS-IT--Management
May 29, 2007
1
US
Is there an easy way to change a string that contains a series of words (separated by spaces) in ALL CAPS, to Title Case, where only the first letter of each word is capitalized?

Example: GLOBAL CHANGES to Global Changes

I know that you could use 'translate' to change GLOBAL CHANGES to global changes but I need the first letter of every word to be capital.

 
Use recursion.

Take a look at Example 1 here. The example uses an upper case character to determine 'word breaks', for which you may substitute a test for whitespace. If you have problems, come back here and show us what you have done, and we'll be able to help.

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top