Skip to content

Instantly share code, notes, and snippets.

@bilz346

bilz346/Format-word.psm1 Secret

Created Oct 6, 2015
Embed
What would you like to do?
Format-Word
Function Format-Word
{
[CmdletBinding()]
Param([parameter(Mandatory=$True,ValueFromPipeline=$True)] [String]$String)
Process
{
ForEach ($Word in $String.split())
{
$First = [string]$Word[0]
$Rest = $Word.TrimStart($First)
$FormattedWord += "$($First.ToUpper() + $Rest.ToLower()) "
}
$FormattedWord
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment