A few wxString doc updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2b44ffc0e7
commit
96c9916560
@ -72,22 +72,27 @@ public:
|
|||||||
@class wxString
|
@class wxString
|
||||||
@wxheader{string.h}
|
@wxheader{string.h}
|
||||||
|
|
||||||
wxString is a class representing a character string. Please see the
|
wxString is a class representing a character string. It uses
|
||||||
@ref overview_wxstringoverview "wxString overview" for more information about
|
reference counting and copy-on-write internally and is not
|
||||||
it.
|
thread-safe. Please see the
|
||||||
|
@ref overview_string "wxString overview" and the
|
||||||
|
@ref overview_unicode "Unicode overview" for more information
|
||||||
|
about it.
|
||||||
|
|
||||||
As explained there, wxString implements most of the methods of the std::string
|
Since wxWidgets 3.0 internally uses UCS-2 (basically 2-byte per
|
||||||
class.
|
character wchar_t) under Windows and UTF-8 under Unix, Linux and
|
||||||
These standard functions are not documented in this manual, please see the
|
OS X to store its content. Much work has been done to make
|
||||||
STL documentation).
|
existing code using ANSI string literals work as before.
|
||||||
The behaviour of all these functions is identical to the behaviour described
|
|
||||||
there.
|
|
||||||
|
|
||||||
You may notice that wxString sometimes has many functions which do the same
|
wxString implements most of the methods of the
|
||||||
thing like, for example, wxString::Length,
|
std::string class. These standard functions are not documented in
|
||||||
wxString::Len and @c length() which all return the string
|
this manual, please see the STL documentation. The behaviour of
|
||||||
length. In all cases of such duplication the @c std::string-compatible
|
all these functions is identical to the behaviour described there.
|
||||||
method (@c length() in this case, always the lowercase version) should be
|
|
||||||
|
You may notice that wxString sometimes has many functions which do
|
||||||
|
the same thing like, for example, wxString::Length, wxString::Len and @c length()
|
||||||
|
which all return the string length. In all cases of such duplication the @c std::string
|
||||||
|
compatible method (@c length() in this case, always the lowercase version) should be
|
||||||
used as it will ensure smoother transition to @c std::string when wxWidgets
|
used as it will ensure smoother transition to @c std::string when wxWidgets
|
||||||
starts using it instead of wxString.
|
starts using it instead of wxString.
|
||||||
|
|
||||||
@ -97,35 +102,80 @@ public:
|
|||||||
@stdobjects
|
@stdobjects
|
||||||
::Objects:, ::wxEmptyString,
|
::Objects:, ::wxEmptyString,
|
||||||
|
|
||||||
@see @ref overview_wxstringoverview "wxString overview", @ref overview_unicode
|
@see @ref overview_string "wxString overview", @ref overview_unicode
|
||||||
"Unicode overview"
|
"Unicode overview"
|
||||||
*/
|
*/
|
||||||
class wxString
|
class wxString
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Initializes the string from first @a nLength characters of C string.
|
Default constructor
|
||||||
The default value of @c wxSTRING_MAXLEN means take all the string.
|
|
||||||
In Unicode build, @e conv's
|
|
||||||
wxMBConv::MB2WC method is called to
|
|
||||||
convert @a psz to wide string (the default converter uses current locale's
|
|
||||||
charset). It is ignored in ANSI build.
|
|
||||||
|
|
||||||
@see @ref overview_mbconvclasses "wxMBConv classes", @ref mbstr()
|
|
||||||
mb_str, @ref wcstr() wc_str
|
|
||||||
*/
|
*/
|
||||||
wxString();
|
wxString();
|
||||||
wxString(const wxString& x);
|
|
||||||
wxString(wxChar ch, size_t n = 1);
|
/**
|
||||||
wxString(const wxChar* psz, size_t nLength = wxSTRING_MAXLEN);
|
Creates a string from another string. Just increases the ref
|
||||||
wxString(const unsigned char* psz,
|
count by 1.
|
||||||
size_t nLength = wxSTRING_MAXLEN);
|
*/
|
||||||
wxString(const wchar_t* psz, const wxMBConv& conv,
|
wxString(const wxString& stringSrc);
|
||||||
size_t nLength = wxSTRING_MAXLEN);
|
|
||||||
wxString(const char* psz, const wxMBConv& conv = wxConvLibc,
|
|
||||||
size_t nLength = wxSTRING_MAXLEN);
|
/**
|
||||||
//@}
|
Constructs a string from the string literal @c psz using
|
||||||
|
the current locale encoding to convert it to Unicode.
|
||||||
|
*/
|
||||||
|
wxString(const char *psz);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from the string literal @c psz using
|
||||||
|
@c conv to convert it Unicode.
|
||||||
|
*/
|
||||||
|
wxString(const char *psz, const wxMBConv& conv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from the first @ nLength character of the string literal @c psz using
|
||||||
|
the current locale encoding to convert it to Unicode.
|
||||||
|
*/
|
||||||
|
wxString(const char *psz, size_t nLength);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from the first @ nLength character of the string literal @c psz using
|
||||||
|
@c conv to convert it Unicode.
|
||||||
|
*/
|
||||||
|
wxString(const char *psz, const wxMBConv& conv, size_t nLength);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from the string literal @c pwz.
|
||||||
|
*/
|
||||||
|
wxString(const wchar_t *pwz);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from the first @ nLength characters of the string literal @c pwz.
|
||||||
|
*/
|
||||||
|
wxString(const wchar_t *pwz, size_t nLength);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from @c buf using the using
|
||||||
|
the current locale encoding to convert it to Unicode.
|
||||||
|
*/
|
||||||
|
wxString(const wxCharBuffer& buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from @c buf.
|
||||||
|
*/
|
||||||
|
wxString(const wxWCharBuffer& buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from @str using the using
|
||||||
|
the current locale encoding to convert it to Unicode.
|
||||||
|
*/
|
||||||
|
wxString(const std::string& str);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructs a string from @str.
|
||||||
|
*/
|
||||||
|
wxString(const std::wstring& str);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
String destructor. Note that this is not virtual, so wxString must not be
|
String destructor. Note that this is not virtual, so wxString must not be
|
||||||
|
Loading…
Reference in New Issue
Block a user