\section{FGETLINE Read a String from a File}

\subsection{Usage}

Reads a string from a file.  The general syntax for its use
is
\begin{verbatim}
  s = fgetline(handle)
\end{verbatim}
This function reads characters from the file \verb|handle| into
a \verb|string| array \verb|s| until it encounters the end of the file
or a newline.  The newline, if any, is retained in the output
string.  If the file is at its end, (i.e., that \verb|feof| would
return true on this handle), \verb|fgetline| returns an empty
string.
\subsection{Example}

First we write a couple of strings to a test file.
\begin{verbatim}
--> fp = fopen('testtext','w');
--> fprintf(fp,'String 1\n');
--> fprintf(fp,'String 2\n');
--> fclose(fp);

\end{verbatim}
Next, we read then back.
\begin{verbatim}
--> fp = fopen('testtext','r')
fp = 
  <uint32>  - size: [1 1]
 12  
--> fgetline(fp)
ans = 
  <string>  - size: [1 9]
 String 1

--> fgetline(fp)
ans = 
  <string>  - size: [1 9]
 String 2

--> fclose(fp);

\end{verbatim}
