'From Squeak3.2alpha of 1 November 2001 [latest update: #4599] on 20 January 2002 at 4:36:13 pm'! "Change Set: fcsStringTruncate Date: 20 January 2002 Author: Frank Sergeant SequenceableCollection>>forceTo:paddingStartWith: blows up (at least in version 3.2a-4599) when shortening the string 'catfish' forceTo: 5 paddingStartWith: $* This change set fixes it."! !SequenceableCollection methodsFor: 'copying' stamp: 'fcs 1/20/2002 16:03'! forceTo: length paddingStartWith: elem "Force the length of the collection to length, padding the beginning of the result if necessary with elem. Note that this makes a copy." | newCollection padLen | newCollection _ self species new: length. padLen _ length - self size max: 0. newCollection from: 1 to: padLen put: elem. newCollection replaceFrom: padLen + 1 to: ((padLen + self size) min: length) with: self startingAt: 1. ^ newCollection! !