Converting words to Title Case

Solution

(Get-Culture).TextInfo.ToTitleCase("war and pEAce")
> War And Peace

Note

Words entirely in UPPER CASE will not be converted
Use .ToLower() first before converting

(Get-Culture).TextInfo.ToTitleCase("WAR AND PEACE".ToLower())
> War And Peace

Reference

#PSTip How to convert words to Title Case: http://www.powershellmagazine.com/2013/07/24/pstip-how-to-convert-words-to-title-case/

results matching ""

    No results matching ""