Function Get-Acronym() {
[CmdletBinding()]
Param (
[string]$Phrase
)
( $Phrase -replace "[-_]"," " -split " " | Foreach-Object {$_[0].ToString().ToUpper()} ) -join ""
}
Find and replace strings.
About Split operator.
About Join operator.
20th Dec 2024
·
Found it useful?