RosettaCodeData/Task/Substring-Top-and-tail/Action-/substring-top-and-tail.action
2023-07-01 13:44:08 -04:00

16 lines
401 B
Text

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