mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-29 23:36:40 +03:00
21 lines
3.0 KiB
Plaintext
21 lines
3.0 KiB
Plaintext
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m [39m[38;5;252m=[39m[38;5;252m [39m[38;5;214m'[39m[38;5;214mabcdefgh[39m[38;5;214m'[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252mn[39m[38;5;252m,[39m[38;5;252m [39m[38;5;252mm[39m[38;5;252m,[39m[38;5;252m [39m[38;5;252mchar[39m[38;5;252m,[39m[38;5;252m [39m[38;5;252mchars[39m[38;5;252m [39m[38;5;252m=[39m[38;5;252m [39m[38;5;67m2[39m[38;5;252m,[39m[38;5;252m [39m[38;5;67m3[39m[38;5;252m,[39m[38;5;252m [39m[38;5;214m'[39m[38;5;214md[39m[38;5;214m'[39m[38;5;252m,[39m[38;5;252m [39m[38;5;214m'[39m[38;5;214mcd[39m[38;5;214m'[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;246m# starting from n=2 characters in and m=3 in length;[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m[[39m[38;5;252mn[39m[38;5;252m-[39m[38;5;67m1[39m[38;5;252m:[39m[38;5;252mn[39m[38;5;252m+[39m[38;5;252mm[39m[38;5;252m-[39m[38;5;67m1[39m[38;5;252m][39m
|
||
[38;5;214m'[39m[38;5;214mbcd[39m[38;5;214m'[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;246m# starting from n characters in, up to the end of the string;[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m[[39m[38;5;252mn[39m[38;5;252m-[39m[38;5;67m1[39m[38;5;252m:[39m[38;5;252m][39m
|
||
[38;5;214m'[39m[38;5;214mbcdefgh[39m[38;5;214m'[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;246m# whole string minus last character;[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m[[39m[38;5;252m:[39m[38;5;252m-[39m[38;5;67m1[39m[38;5;252m][39m
|
||
[38;5;214m'[39m[38;5;214mabcdefg[39m[38;5;214m'[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;246m# starting from a known character char="d" within the string and of m length;[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252mindx[39m[38;5;252m [39m[38;5;252m=[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m.[39m[38;5;252mindex[39m[38;5;252m([39m[38;5;252mchar[39m[38;5;252m)[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m[[39m[38;5;252mindx[39m[38;5;252m:[39m[38;5;252mindx[39m[38;5;252m+[39m[38;5;252mm[39m[38;5;252m][39m
|
||
[38;5;214m'[39m[38;5;214mdef[39m[38;5;214m'[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;246m# starting from a known substring chars="cd" within the string and of m length.[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252mindx[39m[38;5;252m [39m[38;5;252m=[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m.[39m[38;5;252mindex[39m[38;5;252m([39m[38;5;252mchars[39m[38;5;252m)[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m[38;5;252m [39m[38;5;252ms[39m[38;5;252m[[39m[38;5;252mindx[39m[38;5;252m:[39m[38;5;252mindx[39m[38;5;252m+[39m[38;5;252mm[39m[38;5;252m][39m
|
||
[38;5;214m'[39m[38;5;214mcde[39m[38;5;214m'[39m
|
||
[38;5;252m>>[39m[38;5;252m>[39m
|