[wx-dev] Re: case insensitive find() in wxString
Vadim Zeitlin
vadim at wxwindows.org
Wed Aug 2 10:17:32 PDT 2006
On Wed, 02 Aug 2006 10:10:12 +0200 Francesco Montorsi <f18m_cpp217828 at yahoo.it> wrote:
FM> Also, there are already various functions in wxString which do not exist
FM> in std::string, isn't it?
Yes, there are. But the plan is to
1. make wxUSE_STL == 1 default
2. deprecate these functions
3. remove them
Of course, neither (2) nor (3) is going to happen any time soon but, still,
adding new functions to wxString is going to make these steps even more
difficult.
FM> > Does the convenience of writing
FM> > Find('x', Case_Ignore) instead of find_first_of("xX") really outweigh this?
FM> besides being (slightly) more readable the first form :), (AFAIK) you
FM> can't currently do e.g.:
FM>
FM> wxString str(" Hello World!");
FM> str.Find("hElLo WoRlD", Case_Ignore) // 1 match!
FM>
FM> and the same with all other functions which could get the additional
FM> "Case_Ignore" parameter...
Yes, I do see how this could be useful... As usual, I'm very tempted to
add new convenient methods to wx classes and it's difficult to argue
against doing this when, subconsciously at least, I know I'm really for it.
OTOH I do know that adding more methods means more chances for bugs, more
trouble maintaining them and complicates (even if slightly) more transition
to std::string in the future.
Anyhow, personally I'd say let's do it, but please let's keep additions to
wxString minimal.
Thanks,
VZ
More information about the wx-dev
mailing list