Search code examples
typescripttitle-casecase-conversion

Title Case a string with TypeScript


Do TypeScript provide any built in methods on strings to capitalize or Title case a string?

I am aware of the methods toLocaleLowerCase(), LowerCase(), toLocaleUpperCase() and UpperCase(). Does TypeScript has another case convertion methods?


Solution

  • There are no additional methods or API's in TypeScript that can not be found in JavaScript.

    I'm sure you can find either an npm package or sample code to title case a string in JavaScript which can be used via TypeScript.