[Issue 1590] std.string.startsWith and endsWith please
Bill Baxter
dnewsgroup at billbaxter.com
Fri Oct 19 11:29:47 PDT 2007
d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=1590
>
>
> andrei at metalanguage.com changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |ASSIGNED
>
>
>
>
> ------- Comment #1 from andrei at metalanguage.com 2007-10-19 13:07 -------
> The functions hasPrefix(E1[] longer, E2[] shorter) and hasSuffix(E1[] longer,
> E2[] shorter) will be part of the next minor release and work with all sensible
> combinations of E1 and E2.
>
>
Sounds good, but what module? Doesn't seem to have much reason to be in
std.string if it works with any types. Perhaps it's time std got an
array utils module with generic array manipulation functions? (A la
cashew.utils.array). You know with "advanced" functionality like
removing an item from an array, etc.
And if it's not going into std.string, I think there's a case to be made
that std.string should still have a startsWith and endsWith (that just
alias hasPrefix/hasSuffix) because std.string is where people will look
for it and those are the names people will expect.
Either way I'll be happy to have the functionality in the std library. :-)
--bb
More information about the Digitalmars-d-bugs
mailing list