\hypertarget{evil__string_8h}{\section{evil\+\_\+string.\+h File Reference}
\label{evil__string_8h}\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
}


The file that provides functions ported from Unix in string.\+h.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{evil__string_8h_a2385d975eddea296daa497e5d36febc9}{ffs} (int i)
\begin{DoxyCompactList}\small\item\em Return the position of the first (least significant) bit set in a word. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{evil__string_8h_a797824d124cbb2bebdd0a1c58b0644b8}{strrstr} (const char $\ast$str, const char $\ast$substr)
\begin{DoxyCompactList}\small\item\em Get the last substring occurence. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{evil__string_8h_ae9229017a4501f8d6a637b4498cfed2e}{strcasestr} (const char $\ast$haystack, const char $\ast$needle)
\begin{DoxyCompactList}\small\item\em Locate a substring into a string, ignoring case. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}{strsep} (char $\ast$$\ast$stringp, const char $\ast$delim)
\begin{DoxyCompactList}\small\item\em Implements the strsep function which is used to separate strings. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The file that provides functions ported from Unix in string.\+h. 



\subsection{Function Documentation}
\hypertarget{evil__string_8h_a2385d975eddea296daa497e5d36febc9}{\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!ffs@{ffs}}
\index{ffs@{ffs}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection[{ffs}]{\setlength{\rightskip}{0pt plus 5cm}int ffs (
\begin{DoxyParamCaption}
\item[{int}]{i}
\end{DoxyParamCaption}
)}}\label{evil__string_8h_a2385d975eddea296daa497e5d36febc9}


Return the position of the first (least significant) bit set in a word. 


\begin{DoxyParams}{Parameters}
{\em i} & Word to take the first bit. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The position of the first bit set, or 0 if no bits are set.
\end{DoxyReturn}
This function returns the position of the first (least significant) bit set in {\ttfamily i}. The least significant bit is position 1 and the most significant position e.\+g. 32 or 64. The function returns 0 if no bits are set in {\ttfamily i}, or the position of the first bit set otherwise.

Conformity\+: B\+S\+D

Supported O\+S\+: Windows X\+P. \hypertarget{evil__string_8h_a797824d124cbb2bebdd0a1c58b0644b8}{\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!strrstr@{strrstr}}
\index{strrstr@{strrstr}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection[{strrstr}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ strrstr (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{substr}
\end{DoxyParamCaption}
)}}\label{evil__string_8h_a797824d124cbb2bebdd0a1c58b0644b8}


Get the last substring occurence. 


\begin{DoxyParams}{Parameters}
{\em str} & The string to search from. \\
\hline
{\em substr} & The substring to search. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The last occurrence of the substring if found, {\ttfamily N\+U\+L\+L} otherwise.
\end{DoxyReturn}
This function retrieves the last occurrence of {\ttfamily substring} in the string {\ttfamily str}. If {\ttfamily str} or {\ttfamily substr} are {\ttfamily N\+U\+L\+L}, of if {\ttfamily substr} is not found in {\ttfamily str}, {\ttfamily N\+U\+L\+L} is returned.

Conformity\+: Non applicable.

Supported O\+S\+: Windows X\+P. \hypertarget{evil__string_8h_ae9229017a4501f8d6a637b4498cfed2e}{\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!strcasestr@{strcasestr}}
\index{strcasestr@{strcasestr}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection[{strcasestr}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ strcasestr (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{haystack, }
\item[{const char $\ast$}]{needle}
\end{DoxyParamCaption}
)}}\label{evil__string_8h_ae9229017a4501f8d6a637b4498cfed2e}


Locate a substring into a string, ignoring case. 


\begin{DoxyParams}{Parameters}
{\em haystack} & The string to search in. \\
\hline
{\em needle} & The substring to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}

\end{DoxyReturn}
This function locates the string {\ttfamily needle} into the string {\ttfamily haystack}, ignoring the case of the characters. It returns apointer to the beginning of the substring, or N\+U\+L\+L if the substring is not found. If {\ttfamily haystack} or {\ttfamily needle} are {\ttfamily N\+U\+L\+L}, this function returns {\ttfamily N\+U\+L\+L}.

Conformity\+: Non applicable.

Supported O\+S\+: Windows X\+P. \hypertarget{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}{\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!strsep@{strsep}}
\index{strsep@{strsep}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection[{strsep}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ strsep (
\begin{DoxyParamCaption}
\item[{char $\ast$$\ast$}]{stringp, }
\item[{const char $\ast$}]{delim}
\end{DoxyParamCaption}
)}}\label{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}


Implements the strsep function which is used to separate strings. 


\begin{DoxyParams}{Parameters}
{\em stringp} & The pointer to the string to search in. \\
\hline
{\em delim} & The delimiter that contains characters used to find the next token. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to the next token or N\+U\+L\+L;
\end{DoxyReturn}
The \hyperlink{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}{strsep()} function locates, in the string referenced by $\ast$stringp, the first occurrence of any character in the string delim (or the terminating `\textbackslash{}0' character) and replaces it with a `\textbackslash{}0'. The location of the next character after the delimiter character (or N\+U\+L\+L, if the end of the string was reached) is stored in $\ast$stringp. The original value of stringp is returned.

An ``empty'' field (i.\+e., a character in the string delim occurs as the first character of $\ast$stringp) can be detected by comparing the location referenced by the returned pointer to `\textbackslash{}0'.

If $\ast$stringp is initially N\+U\+L\+L, \hyperlink{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}{strsep()} returns N\+U\+L\+L.

This function is from Lib\+G\+W32\+C. \begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
