RosettaCodeData/Task/Substring-Top-and-tail/Action-/substring-top-and-tail.action

17 lines
401 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
PROC Main()
CHAR ARRAY text="qwertyuiop"
CHAR ARRAY res(20)
BYTE n,m
PrintF("Original string:%E ""%S""%E%E",text)
SCopyS(res,text,2,text(0))
PrintF("String without the top:%E ""%S""%E%E",res)
SCopyS(res,text,1,text(0)-1)
PrintF("String without the tail:%E ""%S""%E%E",res)
SCopyS(res,text,2,text(0)-1)
PrintF("String without the top and the tail:%E ""%S""%E%E",res)
RETURN