X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc81d32f2bf8c159f3b1bf6ddaf62e6d77720209..f973828cd9b31d3b80386fab5e6f7c4a106d97fc:/docs/latex/wx/wxstring.tex?ds=sidebyside

diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex
index a77d3324f7..6ff8f7b050 100644
--- a/docs/latex/wx/wxstring.tex
+++ b/docs/latex/wx/wxstring.tex
@@ -6,7 +6,15 @@ 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
-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
+used as it will ensure smoother transition to {\tt std::string} when wxWindows
+starts using it instead of wxString.
 
 \wxheading{Derived from}
 
@@ -577,15 +585,13 @@ Searches for the given string. Returns the starting index, or -1 if not found.
 
 \membersection{wxString::First}\label{wxstringfirst}
 
-\func{size\_t}{First}{\param{char}{ c}}
-
-\constfunc{size\_t}{First}{\param{const char*}{ psz}}
+\func{int}{First}{\param{char}{ c}}
 
-\constfunc{size\_t}{First}{\param{const wxString\&}{ str}}
+\constfunc{int}{First}{\param{const char*}{ psz}}
 
-\constfunc{size\_t}{First}{\param{const char}{ ch}}
+\constfunc{int}{First}{\param{const wxString\&}{ str}}
 
-Returns the first occurrence of the item.
+Same as \helpref{Find}{wxstringfind}.
 
 \membersection{wxString::Format}\label{wxstringformat}
 
@@ -615,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.
 
+\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 wxWindows.
+
 \membersection{wxString::GetChar}\label{wxstringgetchar}
 
 \constfunc{char}{GetChar}{\param{size\_t}{ n}}
@@ -635,9 +651,11 @@ Returns a reference to the character at position {\it n}.
 
 \membersection{wxString::GetWriteBuf}\label{wxstringgetwritebuf}
 
-\func{char*}{GetWriteBuf}{\param{size\_t}{ len}}
+\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.
@@ -646,8 +664,6 @@ to put the string back into a reasonable state.
 
 \constfunc{size\_t}{Index}{\param{char}{ ch}}
 
-Same as \helpref{wxString::Find}{wxstringfind}.
-
 \constfunc{size\_t}{Index}{\param{const char*}{ sz}}
 
 Same as \helpref{wxString::Find}{wxstringfind}.
@@ -764,15 +780,15 @@ Same as MakeLower.
 
 \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}
 
-\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}
 
@@ -902,6 +918,17 @@ have different meaning).
 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}}
