[squeak-dev] The Trunk: Collections-edc.285.mcz
Levente Uzonyi
leves at elte.hu
Fri Jan 29 14:25:04 UTC 2010
On Fri, 29 Jan 2010, commits at source.squeak.org wrote:
> Edgar J. De Cleene uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-edc.285.mcz
>
> ==================== Summary ====================
>
> Name: Collections-edc.285
> Author: edc
> Time: 29 January 2010, 7:01:04.567 am
> UUID: b62a5e69-31ed-4958-b317-621a163b5a90
> Ancestors: Collections-ul.284
>
> -enh Add String > beginsWithAnyOf:
>
What about removing this and #endsWithAnyOf: too?
#endsWithAnyOf: has only a single sender in the current image, and it
doesn't seems to be generally useful.
If we are about to keep them, then this implementation seems to be more
readable:
^aCollection anySatisfy: [ :each | self beginsWith: each ]
Levente
> =============== Diff against Collections-ul.284 ===============
>
> Item was added:
> + ----- Method: String>>beginsWithAnyOf: (in category 'comparing') -----
> + beginsWithAnyOf: aCollection
> + aCollection do:[:suffix|
> + (self beginsWith: suffix) ifTrue:[^true].
> + ].
> + ^false!
>
>
>
More information about the Squeak-dev
mailing list
|