titleCase pipe

This is the documentation for Angular 6.
You can switch to the latest version Angular 7.

Transforms text to title case. Capitalizes the first letter of each word, and transforms the rest of the word to lower case. Words are delimited by any whitespace character, such as a space, tab, or line-feed character.

Source
<p>{{'some string' | titlecase}}</p>
<p>{{'tHIs is mIXeD CaSe' | titlecase}}</p>
<p>{{'it\'s non-trivial question' | titlecase}}</p>
<p>{{'one,two,three' | titlecase}}</p>
<p>{{'true|false' | titlecase}}</p>
<p>{{'foo-vs-bar' | titlecase}}</p>
Result

Some String

This Is Mixed Case

It's Non-trivial Question

One,two,three

True|false

Foo-vs-bar