Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Substring/NewLISP/substring.l
Normal file
17
Task/Substring/NewLISP/substring.l
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
> (set 'str "alphabet" 'n 2 'm 4)
|
||||
4
|
||||
> ; starting from n characters in and of m length
|
||||
> (slice str n m)
|
||||
"phab"
|
||||
> ; starting from n characters in, up to the end of the string
|
||||
> (slice str n)
|
||||
"phabet"
|
||||
> ; whole string minus last character
|
||||
> (chop str)
|
||||
"alphabe"
|
||||
> ; starting from a known character within the string and of m length
|
||||
> (slice str (find "l" str) m)
|
||||
"lpha"
|
||||
> ; starting from a known substring within the string and of m length
|
||||
> (slice str (find "ph" str) m)
|
||||
"phab"
|
||||
Loading…
Add table
Add a link
Reference in a new issue