\doxysection{osmo\+\_\+strbuf Struct Reference}
\label{structosmo__strbuf}\index{osmo\_strbuf@{osmo\_strbuf}}


State for \doxyref{OSMO\+\_\+\+STRBUF\+\_\+\+APPEND()}{p.}{group__utils_gafff80b7c628a7b9138d0d663f6554de2} and \doxyref{OSMO\+\_\+\+STRBUF\+\_\+\+PRINTF()}{p.}{group__utils_ga5d295313b60e7dfe54cd0cd091733d49}.  




{\ttfamily \#include $<$utils.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
char $\ast$ \textbf{ buf}
\begin{DoxyCompactList}\small\item\em Point to the start of a string buffer. \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ len}
\begin{DoxyCompactList}\small\item\em Total sizeof() the buffer buf points at. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ pos}
\begin{DoxyCompactList}\small\item\em Current writing position in buf (end of the string written so far). \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ chars\+\_\+needed}
\begin{DoxyCompactList}\small\item\em After all OSMO\+\_\+\+STRBUF\+\_\+\+APPEND operations, reflects the total number of characters that would be written had buf been large enough. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
State for \doxyref{OSMO\+\_\+\+STRBUF\+\_\+\+APPEND()}{p.}{group__utils_gafff80b7c628a7b9138d0d663f6554de2} and \doxyref{OSMO\+\_\+\+STRBUF\+\_\+\+PRINTF()}{p.}{group__utils_ga5d295313b60e7dfe54cd0cd091733d49}. 

See there for examples. 

\doxysubsection{Field Documentation}
\mbox{\label{structosmo__strbuf_a4152a371ad63172d7c0e5cd454b7ea5f}} 
\index{osmo\_strbuf@{osmo\_strbuf}!buf@{buf}}
\index{buf@{buf}!osmo\_strbuf@{osmo\_strbuf}}
\doxysubsubsection{buf}
{\footnotesize\ttfamily char$\ast$ osmo\+\_\+strbuf\+::buf}



Point to the start of a string buffer. 



Referenced by \textbf{ \+\_\+osmo\+\_\+escape\+\_\+str\+\_\+buf()}, \textbf{ \+\_\+osmo\+\_\+quote\+\_\+str\+\_\+buf()}, \textbf{ \+\_\+osmo\+\_\+strbuf\+\_\+char\+\_\+count()}, \textbf{ \+\_\+osmo\+\_\+strbuf\+\_\+remain()}, \textbf{ log\+\_\+output\+\_\+buf()}, \textbf{ osmo\+\_\+escape\+\_\+cstr\+\_\+buf()}, \textbf{ osmo\+\_\+escape\+\_\+str\+\_\+buf2()}, \textbf{ osmo\+\_\+escape\+\_\+str\+\_\+buf3()}, \textbf{ osmo\+\_\+int\+\_\+to\+\_\+float\+\_\+str\+\_\+buf()}, \textbf{ osmo\+\_\+quote\+\_\+cstr\+\_\+buf()}, \textbf{ osmo\+\_\+quote\+\_\+str\+\_\+buf()}, \textbf{ osmo\+\_\+quote\+\_\+str\+\_\+buf2()}, \textbf{ osmo\+\_\+quote\+\_\+str\+\_\+buf3()}, \textbf{ osmo\+\_\+str\+\_\+tolower\+\_\+c()}, \textbf{ osmo\+\_\+str\+\_\+toupper\+\_\+c()}, \textbf{ osmo\+\_\+strbuf\+\_\+added\+\_\+tail()}, \textbf{ osmo\+\_\+strbuf\+\_\+drop\+\_\+tail()}, and \textbf{ osmo\+\_\+use\+\_\+count\+\_\+to\+\_\+str\+\_\+buf()}.

\mbox{\label{structosmo__strbuf_a97f0dc9632c154511285e720018fa5df}} 
\index{osmo\_strbuf@{osmo\_strbuf}!chars\_needed@{chars\_needed}}
\index{chars\_needed@{chars\_needed}!osmo\_strbuf@{osmo\_strbuf}}
\doxysubsubsection{chars\_needed}
{\footnotesize\ttfamily size\+\_\+t osmo\+\_\+strbuf\+::chars\+\_\+needed}



After all OSMO\+\_\+\+STRBUF\+\_\+\+APPEND operations, reflects the total number of characters that would be written had buf been large enough. 

Like snprintf()\textquotesingle{}s return value, this does not include the terminating nul character. Hence, to allocate an adequately sized buffer, add 1 to this number. 

Referenced by \textbf{ \+\_\+osmo\+\_\+escape\+\_\+str\+\_\+buf()}, \textbf{ \+\_\+osmo\+\_\+quote\+\_\+str\+\_\+buf()}, \textbf{ osmo\+\_\+int\+\_\+to\+\_\+float\+\_\+str\+\_\+buf()}, \textbf{ osmo\+\_\+strbuf\+\_\+added\+\_\+tail()}, \textbf{ osmo\+\_\+strbuf\+\_\+drop\+\_\+tail()}, and \textbf{ osmo\+\_\+use\+\_\+count\+\_\+to\+\_\+str\+\_\+buf()}.

\mbox{\label{structosmo__strbuf_a4d611f24cb8efff2a68b135036bad67d}} 
\index{osmo\_strbuf@{osmo\_strbuf}!len@{len}}
\index{len@{len}!osmo\_strbuf@{osmo\_strbuf}}
\doxysubsubsection{len}
{\footnotesize\ttfamily size\+\_\+t osmo\+\_\+strbuf\+::len}



Total sizeof() the buffer buf points at. 



Referenced by \textbf{ \+\_\+osmo\+\_\+strbuf\+\_\+char\+\_\+count()}, \textbf{ \+\_\+osmo\+\_\+strbuf\+\_\+remain()}, and \textbf{ osmo\+\_\+strbuf\+\_\+added\+\_\+tail()}.

\mbox{\label{structosmo__strbuf_a3ab32600dbec00c82d7b366f18e3ebe7}} 
\index{osmo\_strbuf@{osmo\_strbuf}!pos@{pos}}
\index{pos@{pos}!osmo\_strbuf@{osmo\_strbuf}}
\doxysubsubsection{pos}
{\footnotesize\ttfamily char$\ast$ osmo\+\_\+strbuf\+::pos}



Current writing position in buf (end of the string written so far). 



Referenced by \textbf{ \+\_\+osmo\+\_\+strbuf\+\_\+char\+\_\+count()}, \textbf{ \+\_\+osmo\+\_\+strbuf\+\_\+remain()}, \textbf{ log\+\_\+output\+\_\+buf()}, \textbf{ osmo\+\_\+strbuf\+\_\+added\+\_\+tail()}, and \textbf{ osmo\+\_\+strbuf\+\_\+drop\+\_\+tail()}.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/osmocom/core/\textbf{ utils.\+h}\end{DoxyCompactItemize}
