Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
10
Task/Substring/11l/substring.11l
Normal file
10
Task/Substring/11l/substring.11l
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
V s = ‘abcdefgh’
|
||||
V n = 2
|
||||
V m = 3
|
||||
V char = ‘d’
|
||||
V chars = ‘cd’
|
||||
print(s[n - 1 .+ m]) // starting from n=2 characters in and m=3 in length
|
||||
print(s[n - 1 ..]) // starting from n characters in, up to the end of the string
|
||||
print(s[0 .< (len)-1]) // whole string minus last character
|
||||
print(s[s.index(char) .+ m]) // starting from a known character char="d" within the string and of m length
|
||||
print(s[s.index(chars) .+ m]) // starting from a known substring chars="cd" within the string and of m length
|
||||
Loading…
Add table
Add a link
Reference in a new issue