RosettaCodeData/Task/Substring-Top-and-tail/XPL0/substring-top-and-tail.xpl0

13 lines
353 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
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);
]