Vadim Zeitlin
b5343e065a
only provide ptrdiff_t versions of verious operator+/- working with iterators instead of overloads for both int and size_t: this seems to be enough and the existing overloads were not enough for 64 bit builds where expressions such as iter+(ptr2-ptr1) didn't compile without extra casts
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-06 22:27:01 +00:00
Vadim Zeitlin
d545bdede6
Fix bug with assigning a part of the string to the same string
...
The fix has several parts:
1. don't free the old string data in ConcatSelf() if we use it as
source
2. implement assign() using replace() rather than clear() + append()
3. fix replace() to work with replacement strings containing embedded
NULs and optimize it by using memcpy() instead of byte-wise copy
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-21 16:45:41 +00:00
Václav Slavík
b5dbe15d0b
added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Václav Slavík
39c20230ba
1. added default constructors for wxString iterators
...
2. fixed assignment of iterator to iterator that points to a different string
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-28 12:49:58 +00:00
Václav Slavík
541aa82180
fixed VC6 warnings about non-dllexported members in dllexported classes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-11 19:59:11 +00:00
Václav Slavík
52de37c78f
1. made CRT wrappers definitions indepenent of wxUSE_UNICODE: both ANSI and Unicode variants are now defined
...
2. split wxcrt.h into wxcrtbase.h with lowlevel compiler-specific definitions and wxcrt.h with ANSI- and Unicode-compatible wx wrappers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-10 17:14:14 +00:00
Václav Slavík
2523e9b700
use UTF8-encoded char* strings in UTF8 build instead of wchar_t* if the current locale uses UTF8;
...
fall back to widechar CRT functions in the locale is not UTF8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-26 11:40:04 +00:00
Václav Slavík
59953bf4ba
added conversion to and from std::string and std::wstring (if wxUSE_STD_STRING)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-17 15:32:05 +00:00
Václav Slavík
817270659e
initial version of UTF-8 strings representation (still converting to wchar_t* a lot); it has to be explicitly enabled with --enable-utf8 for now
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-12 21:15:07 +00:00
Václav Slavík
89360a8c87
string iterator's operator- should return difference_type, not size_t or unsigned
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-09 08:18:33 +00:00
Vadim Zeitlin
15c1210982
compilation fix for VC7.1: add size_t overloads for arithmetic operators on wxStringImpl::iterator
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-06 19:08:21 +00:00
Vadim Zeitlin
7c2b62db91
compilation fix for g++ 3 (and probably others) after the last commit
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 22:33:16 +00:00
Vadim Zeitlin
f2a1b1bd23
added overloads taking pairs of const char/wchar_t pointers for wxString methods working with const_iterators for backwards compatibility with old wxString::const_iterator which used to be convertible to/from const wxChar *
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 21:55:29 +00:00
Václav Slavík
745817ffbc
(OS/2) compilation fix
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-01 07:52:14 +00:00
Václav Slavík
a7ea63e21f
split string.{h,cpp} into {string,stringimpl,arrstr}.{h,cpp} to make the files more managable
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-28 11:35:07 +00:00