File tree Expand file tree Collapse file tree 10 files changed +149
-39
lines changed Expand file tree Collapse file tree 10 files changed +149
-39
lines changed Original file line number Diff line number Diff line change @@ -30,16 +30,16 @@ <h2>Typical command line</h2>
3030< pre > < code class ="language-shell "> string slice 3 8 'one|two|three'
3131</ code > </ pre >
3232
33- < p > Would return < code > two</ code > </ p >
33+ < p > Would return < code > | two| </ code > </ p >
3434
3535< h2 > Piping content</ h2 >
3636
3737< p > NOTE: To read content from standard input we use the < code > -i -</ code > option.</ p >
3838
39- < pre > < code class ="language-shell "> echo 'one|two|three' | string -i - slice '|'
39+ < pre > < code class ="language-shell "> echo 'one|two|three' | string -i - slice 3 8
4040</ code > </ pre >
4141
42- < p > Would return < code > ["one"," two","three"] </ code > </ p >
42+ < p > Would return < code > | two| </ code > </ p >
4343
4444</ section >
4545
Original file line number Diff line number Diff line change 11
2- # string slice DELIMITER [ JSON_ARRAY ]
2+ # string slice START END [ STRING ]
33
44This command will return slice a string starting
55at START (inclusive) and finishing at END (exclusive).
Original file line number Diff line number Diff line change 1+
2+ # string toupper [ STRING]
3+
4+ This command will with return a upper case version of
5+ string.
6+
7+ ## Typical command line
8+
9+ ``` shell
10+ string toupper " the people were freindly"
11+ ```
12+
13+ Would return ` THE PEOPLE WERE FREINDLY `
14+
15+ ## Piping content
16+
17+ NOTE: To read content from standard input we use the ` -i - ` option.
18+
19+ ``` shell
20+ echo " the people were freindly" | string -i - toupper
21+ ```
22+
23+ Would return ` THE PEOPLE WERE FREINDLY `
24+
Original file line number Diff line number Diff line change 1+
2+ # string trim CUTSET [ STRING]
3+
4+ This command will with trim all the characters in
5+ CUTSET from the (beginning and end) of STRING.
6+
7+ ## Typical command line
8+
9+ ``` shell
10+ string trim " -" " --people--"
11+ ```
12+
13+ Would return ` people `
14+
15+ ## Piping content
16+
17+ NOTE: To read content from standard input we use the ` -i - ` option.
18+
19+ ``` shell
20+ echo " --people--" | string -i - trim " -"
21+ ```
22+
23+ Would return ` people `
24+
Original file line number Diff line number Diff line change 1+
2+ # string trimleft CUTSET [ STRING]
3+
4+ This command will with trim all the characters in
5+ CUTSET from left side of STRING.
6+
7+ ## Typical command line
8+
9+ ``` shell
10+ string trimleft " -" " --people--"
11+ ```
12+
13+ Would return ` people-- `
14+
15+ ## Piping content
16+
17+ NOTE: To read content from standard input we use the ` -i - ` option.
18+
19+ ``` shell
20+ echo " --people--" | string -i - trimleft " -"
21+ ```
22+
23+ Would return ` people-- `
24+
Original file line number Diff line number Diff line change 1+
2+ # string trimprefix PREFIX [ STRING]
3+
4+
5+ This command will with trim all PREFIX from the STRING.
6+
7+ ## Typical command line
8+
9+ ``` shell
10+ string trimprefix " --" " --people--"
11+ ```
12+
13+ Would return ` people-- `
14+
15+ ## Piping content
16+
17+ NOTE: To read content from standard input we use the ` -i - ` option.
18+
19+ ``` shell
20+ echo " --people--" | string -i - trimprefix " --"
21+ ```
22+
23+ Would return ` people-- `
24+
Original file line number Diff line number Diff line change 1+
2+ # string trimright CUTSET [ STRING]
3+
4+
5+ This command will with trim all the characters in
6+ CUTSET from right side of the STRING.
7+
8+ ## Typical command line
9+
10+ ``` shell
11+ string trimright " -" " --people--"
12+ ```
13+
14+ Would return ` --people `
15+
16+ ## Piping content
17+
18+ NOTE: To read content from standard input we use the ` -i - ` option.
19+
20+ ``` shell
21+ echo " --people--" | string -i - trimright " -"
22+ ```
23+
24+ Would return ` --people `
25+
Original file line number Diff line number Diff line change 1+
2+ # string trimsuffix SUFFIX [ STRING]
3+
4+
5+ This command will with trim all the SUFFIX from the STRING.
6+
7+ ## Typical command line
8+
9+ ``` shell
10+ string trimsuffix " --" " --people--"
11+ ```
12+
13+ Would return ` --people `
14+
15+ ## Piping content
16+
17+ NOTE: To read content from standard input we use the ` -i - ` option.
18+
19+ ``` shell
20+ echo " --people--" | string -i - trimsuffix " --"
21+ ```
22+
23+ Would return ` --people `
24+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments