Quicktip - Capitalizing text

Hey all,

I think you'll find this little tip handy.

Text Blaze has in-built functions for changing the case of a string of text to:

  • all uppercase
  • all lowercase
  • title case (capitalizing the first letter of every word)

Here's how it's done:

{formtext: name=text; default=the QUICK BrowN fOx juMPed Over the LAZY doGs}

No change: {=text}
All uppercase: {=upper(text)}
All lowercase: {=lower(text)}
Title case: {=proper(text)}

If you want to change the text to sentence case (only the first letter of the first word in the sentence is capitalized) you can do it this way:

{formtext: name=text; default=the QUICK BrowN fOx juMPed Over the LAZY doGs}

{=replaceregex(lower(text), ".", upper(extractregex(text, ".")))}

3 Likes

Thank you for sharing

2 Likes