documented the weird behaviour of wxTextFile:GetPrev/NextLine

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-07-27 14:01:59 +00:00
parent 2c33291c88
commit 0b397099c7
2 changed files with 42 additions and 6 deletions

View File

@@ -189,10 +189,13 @@ allows more "iterator-like" traversal of the list of lines, i.e. you may
write something like:
\begin{verbatim}
for ( str = GetFirstLine(); !Eof(); str = GetNextLine() )
wxTextFile file;
...
for ( str = file.GetFirstLine(); !file.Eof(); str = file.GetNextLine() )
{
// do something with the current line in str
}
// do something with the last line in str
\end{verbatim}
\membersection{wxTextFile::GetNextLine}\label{wxtextfilegetnextline}
@@ -212,7 +215,21 @@ Gets the previous line in the file.
\func{wxString\&}{GetLastLine}{\void}
Gets the last line of the file.
Gets the last line of the file. Together with
\helpref{GetPrevLine}{wxtextfilegetprevline} it allows to enumerate the lines
in the file from the end to the beginning like this:
\begin{verbatim}
wxTextFile file;
...
for ( str = file.GetLastLine();
file.GetCurrentLine() > 0;
str = file.GetPrevLine() )
{
// do something with the current line in str
}
// do something with the first line in str
\end{verbatim}
\membersection{wxTextFile::GetLineType}\label{wxtextfilegetlinetype}