I'm not sure, but in ANSI, indexOfSubcollection:startingAt: is defined as returning 0 (no match) for an empty collection. This doesn't necessarily mean that #beginsWith: needs to return false as well, of course, but it would be another data point. And I just checked VW and it returns true for both #beginsWith: and #endsWith: in this case so that may be an argument the other way (haven't checked Gnu or VA - not sure if they even implement it). Julian 2010/3/4 Gabriel Cotelli <g.cotelli@gmail.com>:
Hi,
I noticed that 'pharo' beginsWith: '' returns false.
Is that Ok? I expect that this returns true, because the empty string is a prefix (and suffix) of any other string. Similar behavior exhibits endsWith:.
This seems a bug to me. What do you think?
In case we acknowledge it's a bug I can post an entry in the issue tracker and tonight upload a SLICE with the fix.
Regards, Gabriel
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project