Skip to content

Instantly share code, notes, and snippets.

/Format-TitleCase Secret

Created Sep 24, 2015
What would you like to do?
Windows PowerShell TFM Book Contest and Giveaway
function Format-TitleCase {
Takes a string of text in any case and formats it to the first letter in every word as capital.
Format-TitleCase is a function that changes a strin of test to capitalize the first letter in every word,
ignoring special characters and numbers.
String of text to format.
Format-TitleCase 'StrIng oF teXT'
'StrIng oF teXT' | Format-TitleCase
Created John Raley
param (
process {
$TextInfo = (Get-Culture).TextInfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment