[wx-dev] Re: case insensitive find() in wxString
Robert Roebling
robert at roebling.de
Wed Aug 2 02:31:29 PDT 2006
Francesco Montorsi wrote:
> Vadim Zeitlin ha scritto:
> > On Tue, 01 Aug 2006 12:24:56 +0200 Francesco Montorsi <f18m_cpp217828 at yahoo.it> wrote:
> >
> > FM> I'd like to know if you would accept patches which adds a "bool
> > FM> caseSensitive = true" argument (or rather a "caseCompare cmp = exact"
> > FM> argument) to the wxString::Find() function.
> >
> > If we were to do it, I'd rather have something like
> >
> > enum { Case_Exact, Case_Ignore };
> > enum { Find_Start = 0, Find_End = 0x8000 };
> > Find(wxChar ch, int flags = Case_Exact | Find_Start);
> >
> > i.e. use bit flags instead of the existing boolean parameter as well.
> ok
>
>
> > FM> This patch would allow to append the "caseCompare cmp = exact" argument
> > FM> to various functions (e.g. Contains, Replace, After/Before First/Last,
> > FM> StartsWith / EndsWith). Specially for wxString::Contains and Replace()
> > FM> that would be very useful IMO.
> > ....
> > FM> What's your opinion ?
> >
> > To be honest, I'm undecided. On one hand, I do see how could this be
> > useful. OTOH we plan to switch to std::string at some moment in the future
> > and adding yet more features which the standard class doesn't have is going
> > to make switching even more difficult.
>
> BTW, why should we switch to std::string in future ?
I'm not in favor of that, either, but it has been a request many
time already. But what I'm actually wondering is how you handle
Unicode uppercase. It is easy for a-z, but even Westeuropean
languages have more letters than these. Is there a native function
for that or an algorithm etc?
Robert
More information about the wx-dev
mailing list