\href{http://travis-ci.org/soldair/node-buffer-indexof}{\texttt{ }}\hypertarget{md_sfcode_node_modules_buffer_indexof_README_autotoc_md4676}{}\doxysection{buffer-\/indexof}\label{md_sfcode_node_modules_buffer_indexof_README_autotoc_md4676}
find the index of a buffer in a buffer. should behave like String.\+index\+Of etc.


\begin{DoxyCode}{0}
\DoxyCodeLine{var bindexOf = require('buffer-\/indexof');}
\DoxyCodeLine{}
\DoxyCodeLine{var newLineBuffer = new Buffer("{}\(\backslash\)n"{});}
\DoxyCodeLine{}
\DoxyCodeLine{var b = new Buffer("{}hi\(\backslash\)nho\(\backslash\)nsilver"{});}
\DoxyCodeLine{}
\DoxyCodeLine{}
\DoxyCodeLine{bindexOf(b,newLineBuffer) === 2}
\DoxyCodeLine{}
\DoxyCodeLine{// you can also start from index}
\DoxyCodeLine{}
\DoxyCodeLine{bindexOf(b,newLineBuffer,3) === 5}
\DoxyCodeLine{}
\DoxyCodeLine{// no match === -\/1}
\DoxyCodeLine{}
\DoxyCodeLine{bindexOf(b,newLineBuffer,6) === -\/1}

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_buffer_indexof_README_autotoc_md4677}{}\doxysubsection{CHANGELOG}\label{md_sfcode_node_modules_buffer_indexof_README_autotoc_md4677}

\begin{DoxyItemize}
\item 1.\+0.\+0
\begin{DoxyItemize}
\item fixed issue finding multibyte needles in haystack. thanks @imulus
\end{DoxyItemize}
\item 1.\+0.\+1
\begin{DoxyItemize}
\item fixed failing to find partial matches as pointed out by @bahaa-\/aidi in \#2 
\end{DoxyItemize}
\end{DoxyItemize}