广告平台(站长使用)
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ConvertToUpperCase.ps1 340 B

4 달 전
123456789
  1. param($inputString)
  2. $words = $inputString.Split('_')
  3. $outputString = ""
  4. foreach ($word in $words) {
  5. $outputString += $word.Substring(0,1).ToUpper() + $word.Substring(1).ToLower() + ""
  6. }
  7. $outputString = $outputString.TrimEnd()
  8. $outputString -replace ' ', '' # 如果想要没有空格的字符串,取消注释这行代码
  9. $outputString