j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
String>withBlanksTrimmed breaks on empty strings in Squeak 1.3, here is a fix:
!String methodsFor: 'converting' stamp: 'go 1/29/98 13:25'! withBlanksTrimmed "Return a copy of the receiver from which leading and trailing blanks have been trimmed. Simplified by Gerardo Richarte 11/3/97. Fixed for empty strings by go 1/29/98 13:24"
self size = 0 ifTrue: [ ^self ]. ^ self copyFrom: (self findFirst: [:eachChar | eachChar isSeparator not]) to: (self findLast: [:eachChar | eachChar isSeparator not])
" ' abc d ' withBlanksTrimmed"! !
Georg
---- Dipl.Ing. Georg Gollmann TU-Wien, EDV-Zentrum
phon:(+43-1) 58801 - 5848 fax: (+43-1) 587 42 11 mail:gollmann@edvz.tuwien.ac.at http://macos.tuwien.ac.at/Gollmann.html
squeak-dev@lists.squeakfoundation.org