Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Substring/Icon/substring.icon
Normal file
14
Task/Substring/Icon/substring.icon
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
procedure main(arglist)
|
||||
write("Usage: substring <string> <first position> <second position> <single character> <substring>")
|
||||
s := \arglist[1] | "aardvarks"
|
||||
n := \arglist[2] | 5
|
||||
m := \arglist[3] | 4
|
||||
c := \arglist[4] | "d"
|
||||
ss := \arglist[5] | "ard"
|
||||
|
||||
write( s[n+:m] )
|
||||
write( s[n:0] )
|
||||
write( s[1:-1] )
|
||||
write( s[find(c,s)+:m] )
|
||||
write( s[find(ss,s)+:m] )
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue