Created
May 2, 2018 11:01
-
-
Save JPRuskin/68f131d8833ea940779ffd4695c7fe1b to your computer and use it in GitHub Desktop.
Adds a ScriptMethod to strings, .ToTitle(). Converts to title case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update-TypeData -TypeName String -MemberType ScriptMethod -MemberName ToTitle -Force -Value { | |
(Get-Culture).TextInfo.ToTitleCase($this) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment