智莺生活mysql模型库
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

9 lignes
340 B

  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