RosettaCodeData/Task/Substring-Top-and-tail/Smalltalk/substring-top-and-tail.st

6 lines
270 B
Smalltalk
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
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.