From: Gerald Brandt on
Hi,

Since wxString (in wxWidgets 3.0) is based on std::basic_string, can I use stl algorithms on wxString? For example, I'd like to use copy_backward() on a wxString.

Gerald

From: Vadim Zeitlin on
On Sat, 6 Jun 2009 10:17:43 -0500 (CDT) Gerald Brandt <gbr(a)majentis.com> wrote:

GB> Since wxString (in wxWidgets 3.0) is based on std::basic_string,

It isn't. It does use std::basic_string internally (unless disabled) but
it doesn't inherit from it which is usually meant by "based on".

GB> can I use stl algorithms on wxString?

You should be able to as it provides the same interface as standard string
class. If anything is missing, let us know.

GB> For example, I'd like to use copy_backward() on a wxString.

You should be able to do it in both 2.9.0 and 2.8.x as well.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
From: Gerald Brandt on
Thanks for the quick response. I re-read the wxString info, and saw where I made my mistake.

I'm currently using a vector of wxChar for my data, but I can't seem to find any documentation on how wxChar handles Unicode characters, or even if it does Unicode. I've been looking through the 3.0 docs at http://docs.wxwidgets.org/trunk. I must be missing something.

I'm considerring moving to wxString simply because it simplifies some data management for me, even though the data I'm dealing with is not a string.

Gerald

----- "Vadim Zeitlin" <vadim(a)wxwidgets.org> wrote:
> On Sat, 6 Jun 2009 10:17:43 -0500 (CDT) Gerald Brandt wrote: GB> Since wxString (in wxWidgets 3.0) is based on std::basic_string, It isn't. It does use std::basic_string internally (unless disabled) but it doesn't inherit from it which is usually meant by "based on". GB> can I use stl algorithms on wxString? You should be able to as it provides the same interface as standard string class. If anything is missing, let us know. GB> For example, I'd like to use copy_backward() on a wxString. You should be able to do it in both 2.9.0 and 2.8.x as well. Regards, VZ -- TT-Solutions: wxWidgets consultancy and technical support http://www.tt-solutions.com/
> _______________________________________________ wx-users mailing list wx-users(a)lists.wxwidgets.org http://lists.wxwidgets.org/mailman/listinfo/wx-users