\doxysection{strfuncs.\+h}
\label{strfuncs_8h_source}\index{include/sphinxbase/strfuncs.h@{include/sphinxbase/strfuncs.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*\ -\/*-\/\ c-\/basic-\/offset:\ 4;\ indent-\/tabs-\/mode:\ nil\ -\/*-\/\ */}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*\ ====================================================================}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ Copyright\ (c)\ 1995-\/2004\ Carnegie\ Mellon\ University.\ \ All\ rights}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ Redistribution\ and\ use\ in\ source\ and\ binary\ forms,\ with\ or\ without}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ modification,\ are\ permitted\ provided\ that\ the\ following\ conditions}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ are\ met:}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ 1.\ Redistributions\ of\ source\ code\ must\ retain\ the\ above\ copyright}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer.\ }}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ 2.\ Redistributions\ in\ binary\ form\ must\ reproduce\ the\ above\ copyright}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer\ in}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ \ \ the\ documentation\ and/or\ other\ materials\ provided\ with\ the}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ \ \ distribution.}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ This\ work\ was\ supported\ in\ part\ by\ funding\ from\ the\ Defense\ Advanced\ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ Research\ Projects\ Agency\ and\ the\ National\ Science\ Foundation\ of\ the\ }}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ United\ States\ of\ America,\ and\ the\ CMU\ Sphinx\ Speech\ Consortium.}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ THIS\ SOFTWARE\ IS\ PROVIDED\ BY\ CARNEGIE\ MELLON\ UNIVERSITY\ \`{}\`{}AS\ IS''\ AND\ }}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ ANY\ EXPRESSED\ OR\ IMPLIED\ WARRANTIES,\ INCLUDING,\ BUT\ NOT\ LIMITED\ TO,\ }}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *\ THE\ IMPLIED\ WARRANTIES\ OF\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ A\ PARTICULAR}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ PURPOSE\ ARE\ DISCLAIMED.\ \ IN\ NO\ EVENT\ SHALL\ CARNEGIE\ MELLON\ UNIVERSITY}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ *\ NOR\ ITS\ EMPLOYEES\ BE\ LIABLE\ FOR\ ANY\ DIRECT,\ INDIRECT,\ INCIDENTAL,}}
\DoxyCodeLine{00027\ \textcolor{comment}{\ *\ SPECIAL,\ EXEMPLARY,\ OR\ CONSEQUENTIAL\ DAMAGES\ (INCLUDING,\ BUT\ NOT\ }}
\DoxyCodeLine{00028\ \textcolor{comment}{\ *\ LIMITED\ TO,\ PROCUREMENT\ OF\ SUBSTITUTE\ GOODS\ OR\ SERVICES;\ LOSS\ OF\ USE,\ }}
\DoxyCodeLine{00029\ \textcolor{comment}{\ *\ DATA,\ OR\ PROFITS;\ OR\ BUSINESS\ INTERRUPTION)\ HOWEVER\ CAUSED\ AND\ ON\ ANY\ }}
\DoxyCodeLine{00030\ \textcolor{comment}{\ *\ THEORY\ OF\ LIABILITY,\ WHETHER\ IN\ CONTRACT,\ STRICT\ LIABILITY,\ OR\ TORT\ }}
\DoxyCodeLine{00031\ \textcolor{comment}{\ *\ (INCLUDING\ NEGLIGENCE\ OR\ OTHERWISE)\ ARISING\ IN\ ANY\ WAY\ OUT\ OF\ THE\ USE\ }}
\DoxyCodeLine{00032\ \textcolor{comment}{\ *\ OF\ THIS\ SOFTWARE,\ EVEN\ IF\ ADVISED\ OF\ THE\ POSSIBILITY\ OF\ SUCH\ DAMAGE.}}
\DoxyCodeLine{00033\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00034\ \textcolor{comment}{\ *\ ====================================================================}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00036\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#ifndef\ \_\_SB\_STRFUNCS\_H\_\_}}
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#define\ \_\_SB\_STRFUNCS\_H\_\_}}
\DoxyCodeLine{00044\ }
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#include\ <stdarg.h>}}
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00047\ \textcolor{comment}{/*\ Win32/WinCE\ DLL\ gunk\ */}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#include\ <sphinxbase/sphinxbase\_export.h>}}
\DoxyCodeLine{00049\ \textcolor{preprocessor}{\#include\ <sphinxbase/prim\_type.h>}}
\DoxyCodeLine{00050\ }
\DoxyCodeLine{00051\ }
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00053\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}\ \{}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#if\ 0}}
\DoxyCodeLine{00056\ \textcolor{comment}{/*\ Fool\ Emacs.\ */}}
\DoxyCodeLine{00057\ \}}
\DoxyCodeLine{00058\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00059\ }
\DoxyCodeLine{00064\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00065\ \textcolor{keywordtype}{char}\ *string\_join(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *base,\ ...);}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00070\ \textcolor{keyword}{enum}\ string\_edge\_e\ \{}
\DoxyCodeLine{00071\ \ \ \ \ STRING\_START,\ \ \ }
\DoxyCodeLine{00072\ \ \ \ \ STRING\_END,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00073\ \ \ \ \ STRING\_BOTH\ \ \ \ \ \ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00074\ \};}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00082\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00083\ \textcolor{keywordtype}{char}\ *string\_trim(\textcolor{keywordtype}{char}\ *\textcolor{keywordtype}{string},\ \textcolor{keyword}{enum}\ string\_edge\_e\ which);}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00092\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00093\ \textcolor{keywordtype}{double}\ atof\_c(\textcolor{keywordtype}{char}\ \textcolor{keyword}{const}\ *str);}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00095\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00096\ uint32\ utf8\_decode(uint32\ *state,\ uint32\ *codep,\ uint32\ *\textcolor{keywordtype}{byte});}
\DoxyCodeLine{00097\ }
\DoxyCodeLine{00098\ \textcolor{comment}{/*\ FIXME:\ Both\ of\ these\ string\ splitting\ functions\ basically\ suck.\ \ I}}
\DoxyCodeLine{00099\ \textcolor{comment}{\ have\ attempted\ to\ fix\ them\ as\ best\ I\ can.\ \ (dhuggins@cs,\ 20070808)\ */}}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00108\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00109\ int32\ str2words\ (\textcolor{keywordtype}{char}\ *line,\ \ \ }
\DoxyCodeLine{00113\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ **wptr,\ \ \ }
\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ n\_wptr\ \ \ }
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ );}
\DoxyCodeLine{00128\ }
\DoxyCodeLine{00142\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00143\ int32\ nextword\ (\textcolor{keywordtype}{char}\ *line,\ }
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *delim,\ }
\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ **word,}
\DoxyCodeLine{00151\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{char}\ *delimfound\ }
\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ );}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00156\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00157\ \}}
\DoxyCodeLine{00158\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00159\ }
\DoxyCodeLine{00160\ }
\DoxyCodeLine{00161\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ \_\_SB\_STRFUNCS\_H\_\_\ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
