X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc81d32f2bf8c159f3b1bf6ddaf62e6d77720209..f7204798e2b7db9e5ebd94c327ed0fef72b18862:/docs/latex/wx/tokenizr.tex diff --git a/docs/latex/wx/tokenizr.tex b/docs/latex/wx/tokenizr.tex index c9e0c44732..75f8ab9e8a 100644 --- a/docs/latex/wx/tokenizr.tex +++ b/docs/latex/wx/tokenizr.tex @@ -10,13 +10,13 @@ string to tokenize and also the delimiters which separate tokens in the string Then \helpref{GetNextToken}{wxstringtokenizergetnexttoken} may be called repeatedly until it \helpref{HasMoreTokens}{wxstringtokenizerhasmoretokens} -returns false. +returns \false. For example: \begin{verbatim} -wxStringTokenizer tkz("first:second:third:fourth", ":"); +wxStringTokenizer tkz(wxT("first:second:third:fourth"), wxT(":")); while ( tkz.HasMoreTokens() ) { wxString token = tkz.GetNextToken(); @@ -66,6 +66,7 @@ the standard {\tt strtok()} function. The empty tokens are never returned.} \latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxStringTokenizer::wxStringTokenizer}\label{wxstringtokenizerwxstringtokenizer} \func{}{wxStringTokenizer}{\void} @@ -79,17 +80,24 @@ methods. Constructor. Pass the string to tokenize, a string containing delimiters and the mode specifying how the string should be tokenized. + \membersection{wxStringTokenizer::CountTokens}\label{wxstringtokenizercounttokens} \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} \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} @@ -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. + \membersection{wxStringTokenizer::GetPosition}\label{wxstringtokenizergetposition} \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 string. + \membersection{wxStringTokenizer::GetString}\label{wxstringtokenizergetstring} \constfunc{wxString}{GetString}{\void} Returns the part of the starting string without all token already extracted. + \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}}