Last active
December 22, 2019 11:28
-
-
Save BitbeyHub/f7bb2c7a78b770ce759c3aecca89ee66 to your computer and use it in GitHub Desktop.
A simple method to uppercase the initial character of a word or sentence with the example of Powershell script language.
This file contains 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
$example_string = 'github' | |
$upper_initial = $example_string -replace "^$($example_string[0])", $example_string[0].ToString().ToUpper() | |
Write-Host $upper_initial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment