RosettaCodeData/Task/Substring-Top-and-tail/Smalltalk/substring-top-and-tail.st
2016-12-05 22:15:40 +01:00

5 lines
270 B
Smalltalk

s := 'upraisers'.
Transcript show: 'Top: ', s allButLast; nl.
Transcript show: 'Tail: ', s allButFirst; nl.
Transcript show: 'Without both: ', s allButFirst allButLast; nl.
Transcript show: 'Without both using substring method: ', (s copyFrom: 2 to: s size - 1); nl.