david wrote:
> trimOrPadToSize: width justify: aSymbol.
>
> Does anyone know what package or parcel this lives in?
>
I don't -- but it seems trivial to implement. (Don't you just love
intention revealing method names :-).
Try adding something like the following (untested code!) to CharacterArray
trimOrPadToSize: width justify: aSymbol
self size = width ifTrue: [^self].
self size > width ifTrue: [^self contractTo: width].
aSymbol = #left
ifTrue:
[^(WriteStream on: (self species new: width))
nextPutAll: self;
next: width - self size
put: Character space;
contents].
aSymbol = #right
ifTrue:
[^(WriteStream on: (self species new: width))
next: width - self size
put: Character space;
nextPutAll: self;
contents].
^self error: 'Illegal justification: ' , aSymbol
HTH,
Reinout
-------
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc