Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/String-prepend/Picat/string-prepend.picat
Normal file
19
Task/String-prepend/Picat/string-prepend.picat
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
go =>
|
||||
|
||||
S = "123456789",
|
||||
println(S),
|
||||
S := "A" ++ S,
|
||||
println(S),
|
||||
|
||||
% append
|
||||
append("B",S,T),
|
||||
S := T,
|
||||
println(S),
|
||||
|
||||
% insert at position
|
||||
S := insert(S,1,'C'), % note: must be a char to keep it a proper string
|
||||
println(S),
|
||||
% insert many characters
|
||||
S := insert_all(S,1,"DE"),
|
||||
println(S),
|
||||
nl.
|
||||
Loading…
Add table
Add a link
Reference in a new issue