_s_d_l__visualtest__parsehelper_8h.tex (3475B)
1\hypertarget{_s_d_l__visualtest__parsehelper_8h}{\section{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-parsehelper.h File Reference} 2\label{_s_d_l__visualtest__parsehelper_8h}\index{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h@{C\-:/\-Users/\-D\-E\-L\-L/\-Work/sdlvisualtest/visualtest/include/\-S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h}} 3} 4\subsection*{Functions} 5\begin{DoxyCompactItemize} 6\item 7char $\ast$$\ast$ \hyperlink{_s_d_l__visualtest__parsehelper_8h_a5f168fdd02f9d40ddbad97bd8c0b6361}{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv} (char $\ast$args) 8\item 9char $\ast$$\ast$ \hyperlink{_s_d_l__visualtest__parsehelper_8h_a508e690ed938e09fc3b724d2faf06899}{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize} (char $\ast$str, int max\-\_\-token\-\_\-len) 10\end{DoxyCompactItemize} 11 12 13\subsection{Detailed Description} 14Header with some helper functions for parsing strings. 15 16\subsection{Function Documentation} 17\hypertarget{_s_d_l__visualtest__parsehelper_8h_a5f168fdd02f9d40ddbad97bd8c0b6361}{\index{S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h@{S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h}!S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv@{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv}} 18\index{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv@{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv}!SDL_visualtest_parsehelper.h@{S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h}} 19\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ S\-D\-L\-Visual\-Test\-\_\-\-Parse\-Args\-To\-Argv ( 20\begin{DoxyParamCaption} 21\item[{char $\ast$}]{args} 22\end{DoxyParamCaption} 23)}}\label{_s_d_l__visualtest__parsehelper_8h_a5f168fdd02f9d40ddbad97bd8c0b6361} 24Takes an string of command line arguments and breaks them up into an array based on whitespace. 25 26 27\begin{DoxyParams}{Parameters} 28{\em args} & The string of arguments.\\ 29\hline 30\end{DoxyParams} 31\begin{DoxyReturn}{Returns} 32N\-U\-L\-L on failure, an array of strings on success. The last element of the array is N\-U\-L\-L. The first element of the array is N\-U\-L\-L and should be set to the path of the executable by the caller. 33\end{DoxyReturn} 34\hypertarget{_s_d_l__visualtest__parsehelper_8h_a508e690ed938e09fc3b724d2faf06899}{\index{S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h@{S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h}!S\-D\-L\-Visual\-Test\-\_\-\-Tokenize@{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}} 35\index{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize@{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}!SDL_visualtest_parsehelper.h@{S\-D\-L\-\_\-visualtest\-\_\-parsehelper.\-h}} 36\subsubsection[{S\-D\-L\-Visual\-Test\-\_\-\-Tokenize}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ S\-D\-L\-Visual\-Test\-\_\-\-Tokenize ( 37\begin{DoxyParamCaption} 38\item[{char $\ast$}]{str, } 39\item[{int}]{max\-\_\-token\-\_\-len} 40\end{DoxyParamCaption} 41)}}\label{_s_d_l__visualtest__parsehelper_8h_a508e690ed938e09fc3b724d2faf06899} 42Takes a string and breaks it into tokens by splitting on whitespace. 43 44 45\begin{DoxyParams}{Parameters} 46{\em str} & The string to be split. \\ 47\hline 48{\em max\-\_\-token\-\_\-len} & Length of each element in the array to be returned.\\ 49\hline 50\end{DoxyParams} 51\begin{DoxyReturn}{Returns} 52N\-U\-L\-L on failure; an array of strings with the tokens on success. The last element of the array is N\-U\-L\-L. 53\end{DoxyReturn}