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
# ------------------------------------------------------------------ | |
# スネークケースをキャメルケースに変換する | |
# 関数名:Convert-SnakeToCamel | |
# 引数 :Snake スネークケース文字列 | |
# 戻り値:キャメルケース文字列 | |
# ------------------------------------------------------------------ | |
function Convert-SnakeToCamel([String]$Snake){ | |
$regex=[regex]"_[a-zA-Z]{1}" | |
$regex.Matches($Snake)|ForEach{ | |
$Snake = $Snake -replace $_.value, ($_.value).SubString(1,1).toUpper() | |
} | |
return $Snake | |
} |
0 件のコメント:
コメントを投稿
注: コメントを投稿できるのは、このブログのメンバーだけです。