From 474e9711477a5737b232435525da1c87f7eb72d2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 12 Sep 2009 10:42:04 +0000 Subject: [PATCH] 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 --- interface/wx/string.h | 20 ++++++++++++++++++++ interface/wx/unichar.h | 10 +++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/interface/wx/string.h b/interface/wx/string.h index 4952ca259a..73a8e86ffc 100644 --- a/interface/wx/string.h +++ b/interface/wx/string.h @@ -112,6 +112,26 @@ public: */ 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 diff --git a/interface/wx/unichar.h b/interface/wx/unichar.h index 83f63525d8..4866c1c11d 100644 --- a/interface/wx/unichar.h +++ b/interface/wx/unichar.h @@ -19,9 +19,9 @@ class wxUniChar { public: /** - This is not wchar_t on purpose, it needs to represent the entire - Unicode code points range and wchar_t may be too small for that - (e.g. on Win32 where wchar_t* is encoded in UTF-16). + A type capable of holding any Unicode code point. + We do not use wchar_t as it cannot do the job on Win32, + where wchar_t is a 16-bit type (wchar_t* is encoded using UTF-16 on Win32). */ typedef wxUint32 value_type; @@ -32,8 +32,8 @@ public: //@{ /** - Create the character from 8bit character value encoded in the current - locale's charset. + Create a character from the 8-bit character value @a c using the + current locale’s encoding. */ wxUniChar(char c); wxUniChar(unsigned char c); -- 2.45.2