Christoph Thiede uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ct.1067.mcz
==================== Summary ====================
Name: Collections-ct.1067 Author: ct Time: 2 May 2024, 8:39:12.852788 pm UUID: bd1e7a83-4090-4c9f-917a-b73e19e850c1 Ancestors: Collections-nice.1060
Fixes typo in String>>truncateWithElipsisTo: but keeps the old method to preserve compatibility. Adds truncateWithEllipsisTo: on Text as well.
=============== Diff against Collections-nice.1060 ===============
Item was changed: ----- Method: String>>truncateWithElipsisTo: (in category 'converting') ----- truncateWithElipsisTo: maxLength + "Historical typo kept for compatibility." - "Return myself or a copy suitably shortened but with elipsis added"
+ ^ self truncateWithEllipsisTo: maxLength! - ^ self size <= maxLength - ifTrue: - [self] - ifFalse: - [(self copyFrom: 1 to: (maxLength - 3)), '...'] - - - "'truncateWithElipsisTo:' truncateWithElipsisTo: 20"!
Item was added: + ----- Method: String>>truncateWithEllipsisTo: (in category 'converting') ----- + truncateWithEllipsisTo: maxLength + "Return myself or a copy suitably shortened but with ellipsis added" + + ^ self size <= maxLength + ifTrue: + [self] + ifFalse: + [(self copyFrom: 1 to: (maxLength - 3)), '...'] + + + "'truncateWithEllipsisTo:' truncateWithEllipsisTo: 20"!
Item was added: + ----- Method: Text>>truncateWithEllipsisTo: (in category 'converting') ----- + truncateWithEllipsisTo: maxLength + "Return myself or a copy suitably shortened but with ellipsis added" + + ^ self size <= maxLength + ifTrue: + [self] + ifFalse: + [(self copyFrom: 1 to: (maxLength - 3)), '...']!
packages@lists.squeakfoundation.org