]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/wxstring.tex
synching down and up events for the synthetic right mouse handling
[wxWidgets.git] / docs / latex / wx / wxstring.tex
index 063ab26142903fbf3dea82c6a8bf6b70f73f1984..20dbf3b196c73b3498de0367f7125c168f3e61c0 100644 (file)
@@ -6,14 +6,14 @@ there, wxString implements about 90\% of methods of the std::string class (itera
 are not supported, nor all methods which use them).
 These standard functions are not documented in this manual so please see the STL documentation.
 The behaviour of all these functions is identical to the behaviour described
 are not supported, nor all methods which use them).
 These standard functions are not documented in this manual so please see the STL documentation.
 The behaviour of all these functions is identical to the behaviour described
-there.
+there (except that wxString is sensitive to null character).
 
 You may notice that wxString sometimes has many functions which do the same
 thing like, for example, \helpref{Length()}{wxstringlength}, 
 \helpref{Len()}{wxstringlen} and {\tt length()} which all return the string
 length. In all cases of such duplication the {\tt std::string}-compatible
 method ({\tt 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, \helpref{Length()}{wxstringlength}, 
 \helpref{Len()}{wxstringlen} and {\tt length()} which all return the string
 length. In all cases of such duplication the {\tt std::string}-compatible
 method ({\tt length()} in this case, always the lowercase version) should be
-used as it will ensure smoother transition to {\tt std::string} when wxWindows
+used as it will ensure smoother transition to {\tt std::string} when wxWidgets
 starts using it instead of wxString.
 
 \wxheading{Derived from}
 starts using it instead of wxString.
 
 \wxheading{Derived from}
@@ -211,9 +211,9 @@ Other string functions.
 \helpref{Pad}{wxstringpad}\\
 \helpref{Truncate}{wxstringtruncate}
 
 \helpref{Pad}{wxstringpad}\\
 \helpref{Truncate}{wxstringtruncate}
 
-\membersection{wxWindows 1.xx compatibility functions}
+\membersection{wxWidgets 1.xx compatibility functions}
 
 
-These functions are deprecated, please consider using new wxWindows 2.0
+These functions are deprecated, please consider using new wxWidgets 2.0
 functions instead of them (or, even better, std::string compatible variants).
 
 \helpref{SubString}{wxstringsubstring}\\
 functions instead of them (or, even better, std::string compatible variants).
 
 \helpref{SubString}{wxstringsubstring}\\
@@ -621,6 +621,16 @@ This static function returns the string containing the result of calling
 
 Returns the number of occurrences of {\it ch} in the string.
 
 
 Returns the number of occurrences of {\it ch} in the string.
 
+\membersection{wxString::FromAscii}\label{wxstringfromascii}
+
+\func{static wxString }{FromAscii}{\param{const char*}{ s}}
+
+\func{static wxString }{FromAscii}{\param{const char}{ c}}
+
+Converts the string or character from an ASCII, 7-bit form
+to the native wxString representation. Most useful when using
+a Unicode build of wxWidgets.
+
 \membersection{wxString::GetChar}\label{wxstringgetchar}
 
 \constfunc{char}{GetChar}{\param{size\_t}{ n}}
 \membersection{wxString::GetChar}\label{wxstringgetchar}
 
 \constfunc{char}{GetChar}{\param{size\_t}{ n}}
@@ -631,7 +641,7 @@ Returns the character at position {\it n} (read-only).
 
 \constfunc{const char*}{GetData}{\void}
 
 
 \constfunc{const char*}{GetData}{\void}
 
-wxWindows compatibility conversion. Returns a constant pointer to the data in the string.
+wxWidgets compatibility conversion. Returns a constant pointer to the data in the string.
 
 \membersection{wxString::GetWritableChar}\label{wxstringgetwritablechar}
 
 
 \membersection{wxString::GetWritableChar}\label{wxstringgetwritablechar}
 
@@ -644,6 +654,8 @@ Returns a reference to the character at position {\it n}.
 \func{wxChar*}{GetWriteBuf}{\param{size\_t}{ len}}
 
 Returns a writable buffer of at least {\it len} bytes.
 \func{wxChar*}{GetWriteBuf}{\param{size\_t}{ len}}
 
 Returns a writable buffer of at least {\it len} bytes.
+It returns a pointer to a new memory block, and the
+existing data will not be copied.
 
 Call \helpref{wxString::UngetWriteBuf}{wxstringungetwritebuf} as soon as possible
 to put the string back into a reasonable state.
 
 Call \helpref{wxString::UngetWriteBuf}{wxstringungetwritebuf} as soon as possible
 to put the string back into a reasonable state.
@@ -768,15 +780,15 @@ Same as MakeLower.
 
 \membersection{wxString::MakeLower}\label{wxstringmakelower}
 
 
 \membersection{wxString::MakeLower}\label{wxstringmakelower}
 
-\func{void}{MakeLower}{\void}
+\func{wxString\&}{MakeLower}{\void}
 
 
-Converts all characters to lower case.
+Converts all characters to lower case and returns the result.
 
 \membersection{wxString::MakeUpper}\label{wxstringmakeupper}
 
 
 \membersection{wxString::MakeUpper}\label{wxstringmakeupper}
 
-\func{void}{MakeUpper}{\void}
+\func{wxString\&}{MakeUpper}{\void}
 
 
-Converts all characters to upper case.
+Converts all characters to upper case and returns the result.
 
 \membersection{wxString::Matches}\label{wxstringmatches}
 
 
 \membersection{wxString::Matches}\label{wxstringmatches}
 
@@ -906,6 +918,17 @@ have different meaning).
 Returns the part of the string between the indices {\it from} and {\it to}
 inclusive.
 
 Returns the part of the string between the indices {\it from} and {\it to}
 inclusive.
 
+\membersection{wxString::ToAscii}\label{wxstringtoascii}
+
+\constfunc{const char*}{ToAscii}{\void}
+
+Converts the string to an ASCII, 7-bit string (ANSI builds only).
+
+\constfunc{const wxCharBuffer}{ToAscii}{\void}
+
+Converts the string to an ASCII, 7-bit string in the form of
+a wxCharBuffer (Unicode builds only).
+
 \membersection{wxString::ToDouble}\label{wxstringtodouble}
 
 \constfunc{bool}{ToDouble}{\param{double}{ *val}}
 \membersection{wxString::ToDouble}\label{wxstringtodouble}
 
 \constfunc{bool}{ToDouble}{\param{double}{ *val}}