There might be situations with TYPO3 where you may want to capitalize the first letter of a string. This is very easy to do with typoscript.

Let's say that there is a string in your template stored as TEXT.

10 = TEXT
10.value = this is a string of text

You could easily capitalize the first letter by using the case property with the value ucfirst.

Using the case property, along with ucfirst to capitalize the first letter of a string works in the following way.

10 = TEXT
10.value = this is a string of text
10.case = ucfirst

Doing this results in the following output.

That's how easy it is. 

There is also upper, which if used instead of ucfirst, will capitalize every letter of a string.

Related Pages