Skip to content

Instantly share code, notes, and snippets.

@BitbeyHub
Last active December 22, 2019 11:28
Show Gist options
  • Save BitbeyHub/f7bb2c7a78b770ce759c3aecca89ee66 to your computer and use it in GitHub Desktop.
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.
$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