Thursday, January 24, 2013

Capitalize the First Letter of each Word in a String

There is a built in .NET method to capitalize the first letter of each word in a string:

newStr = Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(str)

This is easier than writing the function to do it.

I found this at:

http://www.vbforums.com/showthread.php?557905-Uppercase-first-letter-in-each-word-of-a-string.

No comments: