mention that CountTokens() returns the number of remaining tokens, not the total count
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -10,7 +10,7 @@ string to tokenize and also the delimiters which separate tokens in the string
|
|||||||
|
|
||||||
Then \helpref{GetNextToken}{wxstringtokenizergetnexttoken} may be called
|
Then \helpref{GetNextToken}{wxstringtokenizergetnexttoken} may be called
|
||||||
repeatedly until it \helpref{HasMoreTokens}{wxstringtokenizerhasmoretokens}
|
repeatedly until it \helpref{HasMoreTokens}{wxstringtokenizerhasmoretokens}
|
||||||
returns false.
|
returns \false.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@@ -66,6 +66,7 @@ the standard {\tt strtok()} function. The empty tokens are never returned.}
|
|||||||
|
|
||||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxStringTokenizer::wxStringTokenizer}\label{wxstringtokenizerwxstringtokenizer}
|
\membersection{wxStringTokenizer::wxStringTokenizer}\label{wxstringtokenizerwxstringtokenizer}
|
||||||
|
|
||||||
\func{}{wxStringTokenizer}{\void}
|
\func{}{wxStringTokenizer}{\void}
|
||||||
@@ -79,17 +80,24 @@ methods.
|
|||||||
Constructor. Pass the string to tokenize, a string containing delimiters
|
Constructor. Pass the string to tokenize, a string containing delimiters
|
||||||
and the mode specifying how the string should be tokenized.
|
and the mode specifying how the string should be tokenized.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxStringTokenizer::CountTokens}\label{wxstringtokenizercounttokens}
|
\membersection{wxStringTokenizer::CountTokens}\label{wxstringtokenizercounttokens}
|
||||||
|
|
||||||
\constfunc{int}{CountTokens}{\void}
|
\constfunc{int}{CountTokens}{\void}
|
||||||
|
|
||||||
Returns the number of tokens in the input string.
|
Returns the number of tokens remaining in the input string. The number of
|
||||||
|
tokens returned by this function is decremented each time
|
||||||
|
\helpref{GetNextToken}{wxstringtokenizergetnexttoken} is called and when it
|
||||||
|
reaches $0$ \helpref{HasMoreTokens}{wxstringtokenizerhasmoretokens} returns
|
||||||
|
\false.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxStringTokenizer::HasMoreTokens}\label{wxstringtokenizerhasmoretokens}
|
\membersection{wxStringTokenizer::HasMoreTokens}\label{wxstringtokenizerhasmoretokens}
|
||||||
|
|
||||||
\constfunc{bool}{HasMoreTokens}{\void}
|
\constfunc{bool}{HasMoreTokens}{\void}
|
||||||
|
|
||||||
Returns true if the tokenizer has further tokens, false if none are left.
|
Returns \true if the tokenizer has further tokens, \false if none are left.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxStringTokenizer::GetNextToken}\label{wxstringtokenizergetnexttoken}
|
\membersection{wxStringTokenizer::GetNextToken}\label{wxstringtokenizergetnexttoken}
|
||||||
|
|
||||||
@@ -97,6 +105,7 @@ Returns true if the tokenizer has further tokens, false if none are left.
|
|||||||
|
|
||||||
Returns the next token or empty string if the end of string was reached.
|
Returns the next token or empty string if the end of string was reached.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxStringTokenizer::GetPosition}\label{wxstringtokenizergetposition}
|
\membersection{wxStringTokenizer::GetPosition}\label{wxstringtokenizergetposition}
|
||||||
|
|
||||||
\constfunc{size\_t}{GetPosition}{\void}
|
\constfunc{size\_t}{GetPosition}{\void}
|
||||||
@@ -105,12 +114,14 @@ Returns the current position (i.e. one index after the last returned
|
|||||||
token or 0 if GetNextToken() has never been called) in the original
|
token or 0 if GetNextToken() has never been called) in the original
|
||||||
string.
|
string.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxStringTokenizer::GetString}\label{wxstringtokenizergetstring}
|
\membersection{wxStringTokenizer::GetString}\label{wxstringtokenizergetstring}
|
||||||
|
|
||||||
\constfunc{wxString}{GetString}{\void}
|
\constfunc{wxString}{GetString}{\void}
|
||||||
|
|
||||||
Returns the part of the starting string without all token already extracted.
|
Returns the part of the starting string without all token already extracted.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxStringTokenizer::SetString}\label{wxstringtokenizersetstring}
|
\membersection{wxStringTokenizer::SetString}\label{wxstringtokenizersetstring}
|
||||||
|
|
||||||
\func{void}{SetString}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " $\backslash$t$\backslash$r$\backslash$n"}, \param{wxStringTokenizerMode }{mode = wxTOKEN\_DEFAULT}}
|
\func{void}{SetString}{\param{const wxString\& }{to\_tokenize}, \param{const wxString\& }{delims = " $\backslash$t$\backslash$r$\backslash$n"}, \param{wxStringTokenizerMode }{mode = wxTOKEN\_DEFAULT}}
|
||||||
|
Reference in New Issue
Block a user