\hypertarget{group__envstr}{
\section{envstr: Environment variables in a str.}
\label{group__envstr}\index{envstr: Environment variables in a str.@{envstr: Environment variables in a str.}}
}
\subsection*{Functions}
\begin{CompactItemize}
\item 
const char $\ast$ \hyperlink{group__envstr_g84cbf1d8cde4ec649b75eb81104279ea}{envstr\_\-find} (const struct \hyperlink{structstr}{str} $\ast$env, const char $\ast$var, long varlen)
\item 
const char $\ast$ \hyperlink{group__envstr_g492560b180478b56cd21bd8ba575b2f4}{envstr\_\-get} (const struct \hyperlink{structstr}{str} $\ast$env, const char $\ast$var)
\item 
int \hyperlink{group__envstr_g555d75c4667f80b5a92df9eab32cbe5a}{envstr\_\-set} (struct \hyperlink{structstr}{str} $\ast$env, const char $\ast$var, const char $\ast$val, int overwrite)
\item 
void \hyperlink{group__envstr_gc01247f87c994910acfaa32b67f78a13}{envstr\_\-unset} (struct \hyperlink{structstr}{str} $\ast$env, const char $\ast$var)
\item 
int \hyperlink{group__envstr_gc805aa4431ebdb4bf588bd9809494c5b}{envstr\_\-put} (struct \hyperlink{structstr}{str} $\ast$env, const char $\ast$asgn, int overwrite)
\item 
int \hyperlink{group__envstr_g534e89d64679f5a75cab6aa987952719}{envstr\_\-from\_\-array} (struct \hyperlink{structstr}{str} $\ast$env, char $\ast$$\ast$array, int overwrite)
\item 
int \hyperlink{group__envstr_g54ce162466679a29cadf5c4e20e2df01}{envstr\_\-from\_\-string} (struct \hyperlink{structstr}{str} $\ast$env, const char $\ast$s, int overwrite)
\item 
char $\ast$$\ast$ \hyperlink{group__envstr_gd725f553159f1c37bd3994d9f0e845f1}{envstr\_\-make\_\-array} (const struct \hyperlink{structstr}{str} $\ast$env)
\end{CompactItemize}


\subsection{Detailed Description}
\begin{Desc}
\item[Calling Convention]\end{Desc}
All functions that allocate memory return {\tt 0} (false) if the function failed due to being unable to allocate memory, and non-zero (true) otherwise. 

\subsection{Function Documentation}
\hypertarget{group__envstr_g84cbf1d8cde4ec649b75eb81104279ea}{
\index{envstr@{envstr}!envstr_find@{envstr\_\-find}}
\index{envstr_find@{envstr\_\-find}!envstr@{envstr}}
\subsubsection[envstr\_\-find]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ envstr\_\-find (const struct \hyperlink{structstr}{str} $\ast$ {\em env}, const char $\ast$ {\em var}, long {\em len})}}
\label{group__envstr_g84cbf1d8cde4ec649b75eb81104279ea}


Find the named variable in the environment string. \begin{Desc}
\item[Returns:]a pointer to the {\bf start} of the assignment. \end{Desc}
\hypertarget{group__envstr_g534e89d64679f5a75cab6aa987952719}{
\index{envstr@{envstr}!envstr_from_array@{envstr\_\-from\_\-array}}
\index{envstr_from_array@{envstr\_\-from\_\-array}!envstr@{envstr}}
\subsubsection[envstr\_\-from\_\-array]{\setlength{\rightskip}{0pt plus 5cm}int envstr\_\-from\_\-array (struct \hyperlink{structstr}{str} $\ast$ {\em env}, char $\ast$$\ast$ {\em array}, int {\em overwrite})}}
\label{group__envstr_g534e89d64679f5a75cab6aa987952719}


Adds the assignments from the array of pointers to the environment string. The array must be terminated by a {\tt NULL} pointer, just the same as the standard {\tt environ} array. \hypertarget{group__envstr_g54ce162466679a29cadf5c4e20e2df01}{
\index{envstr@{envstr}!envstr_from_string@{envstr\_\-from\_\-string}}
\index{envstr_from_string@{envstr\_\-from\_\-string}!envstr@{envstr}}
\subsubsection[envstr\_\-from\_\-string]{\setlength{\rightskip}{0pt plus 5cm}int envstr\_\-from\_\-string (struct \hyperlink{structstr}{str} $\ast$ {\em env}, const char $\ast$ {\em s}, int {\em overwrite})}}
\label{group__envstr_g54ce162466679a29cadf5c4e20e2df01}


Adds the string-based list of assignments to the environment string. Each individual assignment in the list must be ASCII NUL terminated, and the final assignment must be followed by two ASCII NULs. \hypertarget{group__envstr_g492560b180478b56cd21bd8ba575b2f4}{
\index{envstr@{envstr}!envstr_get@{envstr\_\-get}}
\index{envstr_get@{envstr\_\-get}!envstr@{envstr}}
\subsubsection[envstr\_\-get]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ envstr\_\-get (const struct \hyperlink{structstr}{str} $\ast$ {\em env}, const char $\ast$ {\em var})}}
\label{group__envstr_g492560b180478b56cd21bd8ba575b2f4}


Get the value of an assignment from an environment string. \hypertarget{group__envstr_gd725f553159f1c37bd3994d9f0e845f1}{
\index{envstr@{envstr}!envstr_make_array@{envstr\_\-make\_\-array}}
\index{envstr_make_array@{envstr\_\-make\_\-array}!envstr@{envstr}}
\subsubsection[envstr\_\-make\_\-array]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$$\ast$ envstr\_\-make\_\-array (const struct \hyperlink{structstr}{str} $\ast$ {\em env})}}
\label{group__envstr_gd725f553159f1c37bd3994d9f0e845f1}


Make a {\tt environ} compatable array of pointers to the environment string. \begin{Desc}
\item[Note:]The returned pointer is dynamically allocated, and must be freed. \end{Desc}
\hypertarget{group__envstr_gc805aa4431ebdb4bf588bd9809494c5b}{
\index{envstr@{envstr}!envstr_put@{envstr\_\-put}}
\index{envstr_put@{envstr\_\-put}!envstr@{envstr}}
\subsubsection[envstr\_\-put]{\setlength{\rightskip}{0pt plus 5cm}int envstr\_\-put (struct \hyperlink{structstr}{str} $\ast$ {\em env}, const char $\ast$ {\em asgn}, int {\em overwrite})}}
\label{group__envstr_gc805aa4431ebdb4bf588bd9809494c5b}


Put an assignment, in {\tt NAME=value} format, into the environment string. \begin{Desc}
\item[Note:]Unlike putenv, a copy of the assignment is made instead of keeping a copy of the given pointer. \end{Desc}
\hypertarget{group__envstr_g555d75c4667f80b5a92df9eab32cbe5a}{
\index{envstr@{envstr}!envstr_set@{envstr\_\-set}}
\index{envstr_set@{envstr\_\-set}!envstr@{envstr}}
\subsubsection[envstr\_\-set]{\setlength{\rightskip}{0pt plus 5cm}int envstr\_\-set (struct \hyperlink{structstr}{str} $\ast$ {\em env}, const char $\ast$ {\em var}, const char $\ast$ {\em val}, int {\em overwrite})}}
\label{group__envstr_g555d75c4667f80b5a92df9eab32cbe5a}


Set the named variable to the given value in the environment string. \hypertarget{group__envstr_gc01247f87c994910acfaa32b67f78a13}{
\index{envstr@{envstr}!envstr_unset@{envstr\_\-unset}}
\index{envstr_unset@{envstr\_\-unset}!envstr@{envstr}}
\subsubsection[envstr\_\-unset]{\setlength{\rightskip}{0pt plus 5cm}void envstr\_\-unset (struct \hyperlink{structstr}{str} $\ast$ {\em env}, const char $\ast$ {\em var})}}
\label{group__envstr_gc01247f87c994910acfaa32b67f78a13}


Unset the named variable in the environment string. 