#findString:startingAt:caseSensitive: broken

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

#findString:startingAt:caseSensitive: broken

Lukas Renggli
The method #findString:startingAt:caseSensitive: seems to be quite
broken. This is sort of a critical bug, because the widely used
#includesSubstring:caseSensitive: (in Pier and Seaside) depends on it.

        http://code.google.com/p/pharo/issues/detail?id=2353

First, the method #findString:startingAt:caseSensitive: has all kinds
of strange comments and warning from a unfinished implementation.
Furthermore -- and this is the bug I am encountering -- it replaces
the string to be searched with an empty WideString if either the
search or the searched string are WideString instances. Thus in the
case any of the participating strings is a WideString the code never
finds a match.

        WideString new
                findSubstring: key
                in: self
                startingAt: start
                matchTable: CaseInsensitiveOrder

In addition, when used in combination with
#includesSubstring:caseSensitive: the code raises a "subscript is out
of bounds" exception, because the start index points to an different
string than the empty one the search is actually performed on.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project