\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 
char $\ast$ \mbox{\hyperlink{evil__string_8h_a9dd8c380e1619571aa097b2119a9bca9}{strndup}} (const char $\ast$str, size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em Duplicate a string. \end{DoxyCompactList}\item 
int \mbox{\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$ \mbox{\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$ \mbox{\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$ \mbox{\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}
\mbox{\Hypertarget{evil__string_8h_a9dd8c380e1619571aa097b2119a9bca9}\label{evil__string_8h_a9dd8c380e1619571aa097b2119a9bca9}} 
\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!strndup@{strndup}}
\index{strndup@{strndup}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection{\texorpdfstring{strndup()}{strndup()}}
{\footnotesize\ttfamily char$\ast$ strndup (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{size\+\_\+t}]{n }\end{DoxyParamCaption})}



Duplicate a string. 


\begin{DoxyParams}{Parameters}
{\em str} & String to be duplicated \\
\hline
{\em n} & size of new duplicated string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The \mbox{\hyperlink{evil__string_8h_a9dd8c380e1619571aa097b2119a9bca9}{strndup()}} function returns a pointer to the duplicated string, or N\+U\+LL if insufficient memory was available.
\end{DoxyReturn}
This function returns a pointer to a new string which is a duplicate of the string str, but only copies at most n bytes. If str is longer than n, only n bytes are copied, and a terminating null byte (\textquotesingle{}\textbackslash{}0\textquotesingle{}) is added.

Conformity\+: B\+SD

Supported OS\+: Windows XP.

\begin{DoxySince}{Since}
1.\+13 
\end{DoxySince}
\mbox{\Hypertarget{evil__string_8h_a2385d975eddea296daa497e5d36febc9}\label{evil__string_8h_a2385d975eddea296daa497e5d36febc9}} 
\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!ffs@{ffs}}
\index{ffs@{ffs}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection{\texorpdfstring{ffs()}{ffs()}}
{\footnotesize\ttfamily int ffs (\begin{DoxyParamCaption}\item[{int}]{i }\end{DoxyParamCaption})}



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\+SD

Supported OS\+: Windows XP. \mbox{\Hypertarget{evil__string_8h_a797824d124cbb2bebdd0a1c58b0644b8}\label{evil__string_8h_a797824d124cbb2bebdd0a1c58b0644b8}} 
\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!strrstr@{strrstr}}
\index{strrstr@{strrstr}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection{\texorpdfstring{strrstr()}{strrstr()}}
{\footnotesize\ttfamily char$\ast$ strrstr (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{const char $\ast$}]{substr }\end{DoxyParamCaption})}



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\+LL} 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\+LL}, of if {\ttfamily substr} is not found in {\ttfamily str}, {\ttfamily N\+U\+LL} is returned.

Conformity\+: Non applicable.

Supported OS\+: Windows XP. \mbox{\Hypertarget{evil__string_8h_ae9229017a4501f8d6a637b4498cfed2e}\label{evil__string_8h_ae9229017a4501f8d6a637b4498cfed2e}} 
\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!strcasestr@{strcasestr}}
\index{strcasestr@{strcasestr}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection{\texorpdfstring{strcasestr()}{strcasestr()}}
{\footnotesize\ttfamily char$\ast$ strcasestr (\begin{DoxyParamCaption}\item[{const char $\ast$}]{haystack,  }\item[{const char $\ast$}]{needle }\end{DoxyParamCaption})}



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\+LL if the substring is not found. If {\ttfamily haystack} or {\ttfamily needle} are {\ttfamily N\+U\+LL}, this function returns {\ttfamily N\+U\+LL}.

Conformity\+: Non applicable.

Supported OS\+: Windows XP. \mbox{\Hypertarget{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}\label{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}} 
\index{evil\+\_\+string.\+h@{evil\+\_\+string.\+h}!strsep@{strsep}}
\index{strsep@{strsep}!evil\+\_\+string.\+h@{evil\+\_\+string.\+h}}
\subsubsection{\texorpdfstring{strsep()}{strsep()}}
{\footnotesize\ttfamily char$\ast$ strsep (\begin{DoxyParamCaption}\item[{char $\ast$$\ast$}]{stringp,  }\item[{const char $\ast$}]{delim }\end{DoxyParamCaption})}



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\+LL;
\end{DoxyReturn}
The \mbox{\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\+LL, if the end of the string was reached) is stored in $\ast$stringp. The original value of stringp is returned.

An \`{}`empty'\textquotesingle{} 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\+LL, \mbox{\hyperlink{evil__string_8h_a93c766c6e86f4f79e7507c21f1794e15}{strsep()}} returns N\+U\+LL.

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