RosettaCodeData/Task/Substring-Top-and-tail/XPL0/substring-top-and-tail.xpl0
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

12 lines
353 B
Text

include c:\cxpl\stdlib;
char S, P;
[S:= "Smiles";
Text(0, S+1); \first character removed
CrLf(0);
P:= S + StrLen(S) - 2; \point to last character in string
P(0):= P(0) ! $80; \set the MSb on the last character
Text(0, S); \last character removed
CrLf(0);
Text(0, S+1); \first and last characters removed
CrLf(0);
]