Skip to content

Commit 5a1d809

Browse files
committed
[2.3 String Substitution] translated fix #11
1 parent 29c1235 commit 5a1d809

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,17 +1011,17 @@ ${varname:offset:length} # 部分文字列展開を行う。これは、offse
10111011
```
10121012

10131013
## 2.3 String Substitution
1014-
1014+
文字列を操作する方法の構文をチェック
10151015
Check some of the syntax on how to manipulate strings
10161016

10171017
```bash
1018-
${variable#pattern} # if the pattern matches the beginning of the variable's value, delete the shortest part that matches and return the rest
1019-
${variable##pattern} # if the pattern matches the beginning of the variable's value, delete the longest part that matches and return the rest
1020-
${variable%pattern} # if the pattern matches the end of the variable's value, delete the shortest part that matches and return the rest
1021-
${variable%%pattern} # if the pattern matches the end of the variable's value, delete the longest part that matches and return the rest
1022-
${variable/pattern/string} # the longest match to pattern in variable is replaced by string. Only the first match is replaced
1023-
${variable//pattern/string} # the longest match to pattern in variable is replaced by string. All matches are replaced
1024-
${#varname} # returns the length of the value of the variable as a character string
1018+
${variable#pattern} # パターンが変数の値の先頭に一致する場合は、一致する最も短い部分を削除し、残りの部分を返す
1019+
${variable##pattern} # パターンが変数の値の先頭に一致する場合は、一致する最も長い部分を削除し、残りの部分を返す
1020+
${variable%pattern} # パターンが変数の値の終わりと一致する場合は、一致する最も短い部分を削除し、残りの部分を返す
1021+
${variable%%pattern} # パターンが変数の値の終わりと一致する場合は、一致する最も長い部分を削除し、残りの部分を返す
1022+
${variable/pattern/string} # 変数の中で最も長いパターンが文字列に置き換えられる。最初の一致のみ置換される
1023+
${variable//pattern/string} # 変数の中で最も長いパターンが文字列に置き換えられる。全ての一致が置換される
1024+
${#varname} # 変数の値の長さを文字列として返す
10251025
```
10261026

10271027
## 2.4. Functions

0 commit comments

Comments
 (0)