Document ctors creating a wxString from repeated characters.

Closes #11187.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-09-12 10:42:04 +00:00
parent 9508a056c1
commit 474e971147
2 changed files with 25 additions and 5 deletions

View File

@@ -112,6 +112,26 @@ public:
*/ */
wxString(const wxString& stringSrc); wxString(const wxString& stringSrc);
/**
Construct a string consisting of @a nRepeat copies of ch.
*/
wxString(wxUniChar ch, size_t nRepeat = 1);
/**
Construct a string consisting of @a nRepeat copies of ch.
*/
wxString(wxUniCharRef ch, size_t nRepeat = 1);
/**
Construct a string consisting of @a nRepeat copies of ch
converted to Unicode using the current locale encoding.
*/
wxString(char ch, size_t nRepeat = 1);
/**
Construct a string consisting of @a nRepeat copies of ch.
*/
wxString(wchar_t ch, size_t nRepeat = 1);
/** /**
Constructs a string from the string literal @a psz using Constructs a string from the string literal @a psz using

View File

@@ -19,9 +19,9 @@ class wxUniChar
{ {
public: public:
/** /**
This is not wchar_t on purpose, it needs to represent the entire A type capable of holding any Unicode code point.
Unicode code points range and wchar_t may be too small for that We do not use wchar_t as it cannot do the job on Win32,
(e.g. on Win32 where wchar_t* is encoded in UTF-16). where wchar_t is a 16-bit type (wchar_t* is encoded using UTF-16 on Win32).
*/ */
typedef wxUint32 value_type; typedef wxUint32 value_type;
@@ -32,8 +32,8 @@ public:
//@{ //@{
/** /**
Create the character from 8bit character value encoded in the current Create a character from the 8-bit character value @a c using the
locale's charset. current locales encoding.
*/ */
wxUniChar(char c); wxUniChar(char c);
wxUniChar(unsigned char c); wxUniChar(unsigned char c);