RosettaCodeData/Task/Substring-Top-and-tail/Eero/substring-top-and-tail.eero
2016-12-05 23:44:36 +01:00

18 lines
435 B
Text

#import <Foundation/Foundation.h>
int main()
autoreleasepool
s := 'knight'
Log( '%@', s[1 .. s.length-1] ) // strip first character
s = 'socks'
Log( '%@', s[0 .. s.length-2] ) // strip last character
s = 'brooms'
Log( '%@', s[1 .. s.length-2] ) // strip both first and last characters
s = 'Δημοτική'
Log( '%@', s[1 .. s.length-2] ) // strip both first and last characters
return 0