I have a string of text (about 5-6 words mostly) that I need to convert.
Currently the text looks like:
THIS IS MY TEXT RIGHT NOW
I want to convert it to:
This Is My Text Right Now
I can loop through my collection of strings, but I am not sure how to go about performing this text modification.
Or use Word's keyboard shortcut, Shift + F3 on Windows or fn + Shift + F3 for Mac, to change selected text between lowercase, UPPERCASE or capitalizing each word.
In JavaScript, we have a method called toUpperCase() , which we can call on strings, or words. As we can imply from the name, you call it on a string/word, and it is going to return the same thing but as an uppercase.
Title case, which capitalizes the first letter of certain key words. Sentence case, in which titles are capitalized like sentences. Initial case, where the first letter of every word is capitalized.
string s = "THIS IS MY TEXT RIGHT NOW"; s = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(s.ToLower());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With