\hypertarget{group__Eina__String__Group}{}\doxysection{String}
\label{group__Eina__String__Group}\index{String@{String}}


Provides useful functions for C string manipulation.  


\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}{eina\+\_\+str\+\_\+join\+\_\+static}}(dst,  sep,  a,  b)~\mbox{\hyperlink{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}{eina\+\_\+str\+\_\+join\+\_\+len}}(dst, sizeof(dst), sep, a, (sizeof(a) $>$ 0) ? sizeof(a) -\/ 1 \+: 0, b, (sizeof(b) $>$ 0) ? sizeof(b) -\/ 1 \+: 0)
\begin{DoxyCompactList}\small\item\em Joins two static strings and store the result in a static buffer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static size\+\_\+t \mbox{\hyperlink{group__Eina__String__Group_ga20b6615a6d105e7c1f6d7166810d3d88}{eina\+\_\+strlen\+\_\+bounded}} (const char $\ast$str, size\+\_\+t maxlen)
\begin{DoxyCompactList}\small\item\em Count up to a given amount of bytes of the given string. \end{DoxyCompactList}\item 
static size\+\_\+t \mbox{\hyperlink{group__Eina__String__Group_ga3b03fc33ef07b92d442e07b3901933ed}{eina\+\_\+str\+\_\+join}} (char $\ast$dst, size\+\_\+t size, char sep, const char $\ast$a, const char $\ast$b)
\begin{DoxyCompactList}\small\item\em Join two strings of known length. \end{DoxyCompactList}\item 
static char $\ast$ \mbox{\hyperlink{group__Eina__String__Group_ga0b8400d50224e035bb163c506e94aa7b}{eina\+\_\+strdup}} (const char $\ast$str)
\begin{DoxyCompactList}\small\item\em strdup function which takes {\ttfamily NULL} without crashing \end{DoxyCompactList}\item 
static char $\ast$ \mbox{\hyperlink{group__Eina__String__Group_gab1a21ba9441206e464d3c7afc394dda7}{eina\+\_\+strndup}} (const char $\ast$str, size\+\_\+t n)
\begin{DoxyCompactList}\small\item\em strndup function which takes {\ttfamily NULL} without crashing \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__String__Group_gae95f831abd514af9e7f537fe4df4d103}{eina\+\_\+streq}} (const char $\ast$a, const char $\ast$b)
\begin{DoxyCompactList}\small\item\em streq function which takes {\ttfamily NULL} without crashing \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{group__Eina__String__Group_ga73466cfd3c7d64608d77706e4bc43e25}{eina\+\_\+strlcpy}} (char $\ast$dst, const char $\ast$src, size\+\_\+t siz)
\begin{DoxyCompactList}\small\item\em Copies a c-\/string to another. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{group__Eina__String__Group_ga3172a47b021bb56263a591e2fefdc729}{eina\+\_\+strlcat}} (char $\ast$dst, const char $\ast$src, size\+\_\+t siz)
\begin{DoxyCompactList}\small\item\em Appends a c-\/string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__String__Group_gaa819f341b1fa8852d68c9e11a9d2340d}{eina\+\_\+str\+\_\+has\+\_\+prefix}} (const char $\ast$str, const char $\ast$prefix)
\begin{DoxyCompactList}\small\item\em Checks if the given string has the given prefix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__String__Group_ga1e84de127ac0214f4983daeea3c3abf8}{eina\+\_\+str\+\_\+has\+\_\+suffix}} (const char $\ast$str, const char $\ast$suffix)
\begin{DoxyCompactList}\small\item\em Checks if the given string has the given suffix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__String__Group_ga0671695663bd983c2b4af8a5fd867073}{eina\+\_\+str\+\_\+has\+\_\+extension}} (const char $\ast$str, const char $\ast$ext)
\begin{DoxyCompactList}\small\item\em Checks if the given string has the given extension. \end{DoxyCompactList}\item 
char $\ast$$\ast$ \mbox{\hyperlink{group__Eina__String__Group_ga601dd2f2032b2a09184164db6f36cc87}{eina\+\_\+str\+\_\+split}} (const char $\ast$string, const char $\ast$delimiter, int max\+\_\+tokens)
\begin{DoxyCompactList}\small\item\em Splits a string using a delimiter. \end{DoxyCompactList}\item 
char $\ast$$\ast$ \mbox{\hyperlink{group__Eina__String__Group_gac408efa406ea8e03d0f6b989ef579a29}{eina\+\_\+str\+\_\+split\+\_\+full}} (const char $\ast$string, const char $\ast$delimiter, int max\+\_\+tokens, unsigned int $\ast$elements)
\begin{DoxyCompactList}\small\item\em Splits a string using a delimiter and returns number of elements. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}{eina\+\_\+str\+\_\+join\+\_\+len}} (char $\ast$dst, size\+\_\+t size, char sep, const char $\ast$a, size\+\_\+t a\+\_\+len, const char $\ast$b, size\+\_\+t b\+\_\+len)
\begin{DoxyCompactList}\small\item\em Joins two strings of known length. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Eina__String__Group_ga0af68ae392f4167f3ab77142ce9fee31}{eina\+\_\+str\+\_\+convert}} (const char $\ast$enc\+\_\+from, const char $\ast$enc\+\_\+to, const char $\ast$text)
\begin{DoxyCompactList}\small\item\em Uses Iconv to convert a text string from one encoding to another. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Eina__String__Group_ga195158809644151a25cae50c2c30468c}{eina\+\_\+str\+\_\+convert\+\_\+len}} (const char $\ast$enc\+\_\+from, const char $\ast$enc\+\_\+to, const char $\ast$text, size\+\_\+t len, size\+\_\+t $\ast$retlen)
\begin{DoxyCompactList}\small\item\em Uses Iconv to convert a text string from one encoding to another. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Eina__String__Group_ga3bef18659d548f869e887f1172368c96}{eina\+\_\+str\+\_\+escape}} (const char $\ast$str)
\begin{DoxyCompactList}\small\item\em Escapes slashes, spaces and apostrophes in strings. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__String__Group_ga0909a116b1d8e9e8d8836f646ac8a2f1}{eina\+\_\+str\+\_\+tolower}} (char $\ast$$\ast$str)
\begin{DoxyCompactList}\small\item\em Lowercases all the characters in range \mbox{[}A-\/Z\mbox{]} in the given string. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__String__Group_ga82c8c194203522f702a6f73570b1220a}{eina\+\_\+str\+\_\+toupper}} (char $\ast$$\ast$str)
\begin{DoxyCompactList}\small\item\em Uppercases all the characters in range \mbox{[}a-\/z\mbox{]} in the given string. \end{DoxyCompactList}\item 
unsigned char $\ast$ \mbox{\hyperlink{group__Eina__String__Group_gad63239b52af915783af40bca8657e9d1}{eina\+\_\+memdup}} (unsigned char $\ast$mem, size\+\_\+t size, \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} terminate)
\begin{DoxyCompactList}\small\item\em Memory duplication function with optional termination for strings. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Eina__String__Group_ga22fd9902b22809e9afcf9feaec7a3b36}{eina\+\_\+strftime}} (const char $\ast$format, const struct tm $\ast$tm)
\begin{DoxyCompactList}\small\item\em Creates and update the buffer based on strftime output. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Provides useful functions for C string manipulation. 

This group of functions allow you to more easily manipulate strings, they provide functionality not available through string.\+h.

\begin{DoxyWarning}{Warning}
Since these functions modify the strings they can\textquotesingle{}t be used with shared strings(eina\+\_\+stringshare).
\end{DoxyWarning}
See an example \mbox{\hyperlink{tutorial_eina_string}{here}}. 

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}\label{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}} 
\index{String@{String}!eina\_str\_join\_static@{eina\_str\_join\_static}}
\index{eina\_str\_join\_static@{eina\_str\_join\_static}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_join\_static}{eina\_str\_join\_static}}
{\footnotesize\ttfamily \#define eina\+\_\+str\+\_\+join\+\_\+static(\begin{DoxyParamCaption}\item[{}]{dst,  }\item[{}]{sep,  }\item[{}]{a,  }\item[{}]{b }\end{DoxyParamCaption})~\mbox{\hyperlink{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}{eina\+\_\+str\+\_\+join\+\_\+len}}(dst, sizeof(dst), sep, a, (sizeof(a) $>$ 0) ? sizeof(a) -\/ 1 \+: 0, b, (sizeof(b) $>$ 0) ? sizeof(b) -\/ 1 \+: 0)}



Joins two static strings and store the result in a static buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dst} & The buffer to store the result. \\
\hline
\mbox{\texttt{ in}}  & {\em sep} & The separator character to use. \\
\hline
\mbox{\texttt{ in}}  & {\em a} & First string to use, before {\ttfamily sep}. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & Second string to use, after {\ttfamily sep}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of characters printed.
\end{DoxyReturn}
This function is similar to \mbox{\hyperlink{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}{eina\+\_\+str\+\_\+join\+\_\+len()}}, but will assume string sizes are know using sizeof(\+X).

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__String__Group_ga3b03fc33ef07b92d442e07b3901933ed}{eina\+\_\+str\+\_\+join()}} 

\mbox{\hyperlink{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}{eina\+\_\+str\+\_\+join\+\_\+static()}} 
\end{DoxySeeAlso}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__String__Group_ga20b6615a6d105e7c1f6d7166810d3d88}\label{group__Eina__String__Group_ga20b6615a6d105e7c1f6d7166810d3d88}} 
\index{String@{String}!eina\_strlen\_bounded@{eina\_strlen\_bounded}}
\index{eina\_strlen\_bounded@{eina\_strlen\_bounded}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_strlen\_bounded()}{eina\_strlen\_bounded()}}
{\footnotesize\ttfamily static size\+\_\+t eina\+\_\+strlen\+\_\+bounded (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{size\+\_\+t}]{maxlen }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Count up to a given amount of bytes of the given string. 


\begin{DoxyParams}{Parameters}
{\em str} & The string pointer. \\
\hline
{\em maxlen} & The maximum length to allow. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the string size or (size\+\_\+t)-\/1 if greater than {\itshape maxlen}.
\end{DoxyReturn}
This function returns the size of {\ttfamily str}, up to {\ttfamily maxlen} characters. It avoid needless iterations after that size. {\ttfamily str} must be a valid pointer and MUST not be {\ttfamily NULL}, otherwise this function will crash. This function returns the string size, or (size\+\_\+t)-\/1 if the size is greater than {\itshape maxlen}. 

Referenced by eina\+\_\+str\+\_\+has\+\_\+prefix().

\mbox{\Hypertarget{group__Eina__String__Group_ga3b03fc33ef07b92d442e07b3901933ed}\label{group__Eina__String__Group_ga3b03fc33ef07b92d442e07b3901933ed}} 
\index{String@{String}!eina\_str\_join@{eina\_str\_join}}
\index{eina\_str\_join@{eina\_str\_join}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_join()}{eina\_str\_join()}}
{\footnotesize\ttfamily static size\+\_\+t eina\+\_\+str\+\_\+join (\begin{DoxyParamCaption}\item[{char $\ast$}]{dst,  }\item[{size\+\_\+t}]{size,  }\item[{char}]{sep,  }\item[{const char $\ast$}]{a,  }\item[{const char $\ast$}]{b }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Join two strings of known length. 


\begin{DoxyParams}{Parameters}
{\em dst} & The buffer to store the result. \\
\hline
{\em size} & Size (in byte) of the buffer. \\
\hline
{\em sep} & The separator character to use. \\
\hline
{\em a} & First string to use, before {\ttfamily sep}. \\
\hline
{\em b} & Second string to use, after {\ttfamily sep}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of characters printed.
\end{DoxyReturn}
This function is similar to \mbox{\hyperlink{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}{eina\+\_\+str\+\_\+join\+\_\+len()}}, but will compute the length of {\ttfamily a} and {\ttfamily b} using strlen().

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}{eina\+\_\+str\+\_\+join\+\_\+len()}} 

\mbox{\hyperlink{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}{eina\+\_\+str\+\_\+join\+\_\+static()}} 
\end{DoxySeeAlso}


References eina\+\_\+str\+\_\+join\+\_\+len().

\mbox{\Hypertarget{group__Eina__String__Group_ga0b8400d50224e035bb163c506e94aa7b}\label{group__Eina__String__Group_ga0b8400d50224e035bb163c506e94aa7b}} 
\index{String@{String}!eina\_strdup@{eina\_strdup}}
\index{eina\_strdup@{eina\_strdup}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_strdup()}{eina\_strdup()}}
{\footnotesize\ttfamily static char$\ast$ eina\+\_\+strdup (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



strdup function which takes {\ttfamily NULL} without crashing 


\begin{DoxyParams}{Parameters}
{\em str} & The string to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the copied string, must be freed 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+12 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__String__Group_gab1a21ba9441206e464d3c7afc394dda7}\label{group__Eina__String__Group_gab1a21ba9441206e464d3c7afc394dda7}} 
\index{String@{String}!eina\_strndup@{eina\_strndup}}
\index{eina\_strndup@{eina\_strndup}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_strndup()}{eina\_strndup()}}
{\footnotesize\ttfamily static char$\ast$ eina\+\_\+strndup (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{size\+\_\+t}]{n }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



strndup function which takes {\ttfamily NULL} without crashing 


\begin{DoxyParams}{Parameters}
{\em str} & The string to copy \\
\hline
{\em n} & The maximum number of char to copy \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the copied string, must be freed 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
this also implements strndup() on Windows 
\end{DoxyNote}
\begin{DoxySince}{Since}
1.\+23 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__String__Group_gae95f831abd514af9e7f537fe4df4d103}\label{group__Eina__String__Group_gae95f831abd514af9e7f537fe4df4d103}} 
\index{String@{String}!eina\_streq@{eina\_streq}}
\index{eina\_streq@{eina\_streq}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_streq()}{eina\_streq()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+streq (\begin{DoxyParamCaption}\item[{const char $\ast$}]{a,  }\item[{const char $\ast$}]{b }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



streq function which takes {\ttfamily NULL} without crashing 


\begin{DoxyParams}{Parameters}
{\em a} & string a \\
\hline
{\em b} & string b \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if strings are equal 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+12 
\end{DoxySince}
\begin{Desc}
\item[Examples]\par
\mbox{\hyperlink{inwin_example_8c-example}{inwin\+\_\+example.\+c}}.\end{Desc}


References EINA\+\_\+\+FALSE, and EINA\+\_\+\+TRUE.



Referenced by ecore\+\_\+wl2\+\_\+display\+\_\+input\+\_\+find\+\_\+by\+\_\+name(), edje\+\_\+edit\+\_\+color\+\_\+class\+\_\+description\+\_\+get(), edje\+\_\+edit\+\_\+color\+\_\+class\+\_\+description\+\_\+set(), elput\+\_\+input\+\_\+pointer\+\_\+xy\+\_\+get(), and evas\+\_\+output\+\_\+method\+\_\+set().

\mbox{\Hypertarget{group__Eina__String__Group_ga73466cfd3c7d64608d77706e4bc43e25}\label{group__Eina__String__Group_ga73466cfd3c7d64608d77706e4bc43e25}} 
\index{String@{String}!eina\_strlcpy@{eina\_strlcpy}}
\index{eina\_strlcpy@{eina\_strlcpy}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_strlcpy()}{eina\_strlcpy()}}
{\footnotesize\ttfamily size\+\_\+t eina\+\_\+strlcpy (\begin{DoxyParamCaption}\item[{char $\ast$}]{dst,  }\item[{const char $\ast$}]{src,  }\item[{size\+\_\+t}]{siz }\end{DoxyParamCaption})}



Copies a c-\/string to another. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dst} & The destination string. \\
\hline
\mbox{\texttt{ in}}  & {\em src} & The source string. \\
\hline
\mbox{\texttt{ in}}  & {\em siz} & The size of the destination string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The length of the source string.
\end{DoxyReturn}
This function copies up to {\ttfamily siz} -\/ 1 characters from the NULL-\/terminated string {\ttfamily src} to {\ttfamily dst}, NULL-\/terminating the result (unless {\ttfamily siz} is equal to 0). The returned value is the length of {\ttfamily src}. If the returned value is greater than {\ttfamily siz}, truncation occurred.

\begin{DoxyNote}{Note}
The main difference between eina\+\_\+strlcpy and strncpy is that this ensures {\ttfamily dst} is NULL-\/terminated even if no {\ttfamily NULL} byte is found in the first {\ttfamily siz} bytes of src. 
\end{DoxyNote}


Referenced by eina\+\_\+error\+\_\+msg\+\_\+get().

\mbox{\Hypertarget{group__Eina__String__Group_ga3172a47b021bb56263a591e2fefdc729}\label{group__Eina__String__Group_ga3172a47b021bb56263a591e2fefdc729}} 
\index{String@{String}!eina\_strlcat@{eina\_strlcat}}
\index{eina\_strlcat@{eina\_strlcat}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_strlcat()}{eina\_strlcat()}}
{\footnotesize\ttfamily size\+\_\+t eina\+\_\+strlcat (\begin{DoxyParamCaption}\item[{char $\ast$}]{dst,  }\item[{const char $\ast$}]{src,  }\item[{size\+\_\+t}]{siz }\end{DoxyParamCaption})}



Appends a c-\/string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dst} & The destination string. \\
\hline
\mbox{\texttt{ in}}  & {\em src} & The source string. \\
\hline
\mbox{\texttt{ in}}  & {\em siz} & The size of the destination string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The length of the source string plus \mbox{\hyperlink{group__Eina__Cpu__Group_ga74e75242132eaabbc1c512488a135926}{MIN(siz, strlen(initial dst))}}
\end{DoxyReturn}
This function appends {\ttfamily src} to {\ttfamily dst} of size {\ttfamily siz} (unlike strncat, {\ttfamily siz} is the full size of {\ttfamily dst}, not space left). At most {\ttfamily siz} -\/ 1 characters will be copied. Always NULL-\/terminates (unless {\ttfamily siz} $<$= strlen(dst)). This function returns strlen(src) + \mbox{\hyperlink{group__Eina__Cpu__Group_ga74e75242132eaabbc1c512488a135926}{MIN(siz, strlen(initial dst))}}. If the returned value is greater or equal than {\ttfamily siz}, truncation occurred. \mbox{\Hypertarget{group__Eina__String__Group_gaa819f341b1fa8852d68c9e11a9d2340d}\label{group__Eina__String__Group_gaa819f341b1fa8852d68c9e11a9d2340d}} 
\index{String@{String}!eina\_str\_has\_prefix@{eina\_str\_has\_prefix}}
\index{eina\_str\_has\_prefix@{eina\_str\_has\_prefix}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_has\_prefix()}{eina\_str\_has\_prefix()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+str\+\_\+has\+\_\+prefix (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{const char $\ast$}]{prefix }\end{DoxyParamCaption})}



Checks if the given string has the given prefix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & The string to work with. \\
\hline
\mbox{\texttt{ in}}  & {\em prefix} & The prefix to check for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if the string has the given prefix, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise.
\end{DoxyReturn}
This function returns \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if {\ttfamily str} has the prefix {\ttfamily prefix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise. If the length of {\ttfamily prefix} is greater than {\ttfamily str}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} is returned. 

References EINA\+\_\+\+FALSE, and eina\+\_\+strlen\+\_\+bounded().



Referenced by ecore\+\_\+win32\+\_\+clipboard\+\_\+get(), and ecore\+\_\+win32\+\_\+clipboard\+\_\+set().

\mbox{\Hypertarget{group__Eina__String__Group_ga1e84de127ac0214f4983daeea3c3abf8}\label{group__Eina__String__Group_ga1e84de127ac0214f4983daeea3c3abf8}} 
\index{String@{String}!eina\_str\_has\_suffix@{eina\_str\_has\_suffix}}
\index{eina\_str\_has\_suffix@{eina\_str\_has\_suffix}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_has\_suffix()}{eina\_str\_has\_suffix()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+str\+\_\+has\+\_\+suffix (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{const char $\ast$}]{suffix }\end{DoxyParamCaption})}



Checks if the given string has the given suffix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & The string to work with. \\
\hline
\mbox{\texttt{ in}}  & {\em suffix} & The suffix to check for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if the string has the given suffix, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise.
\end{DoxyReturn}
This function returns \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if {\ttfamily str} has the suffix {\ttfamily suffix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise. If the length of {\ttfamily suffix} is greater than {\ttfamily str}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} is returned. \mbox{\Hypertarget{group__Eina__String__Group_ga0671695663bd983c2b4af8a5fd867073}\label{group__Eina__String__Group_ga0671695663bd983c2b4af8a5fd867073}} 
\index{String@{String}!eina\_str\_has\_extension@{eina\_str\_has\_extension}}
\index{eina\_str\_has\_extension@{eina\_str\_has\_extension}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_has\_extension()}{eina\_str\_has\_extension()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+str\+\_\+has\+\_\+extension (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str,  }\item[{const char $\ast$}]{ext }\end{DoxyParamCaption})}



Checks if the given string has the given extension. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & The string to work with. \\
\hline
\mbox{\texttt{ in}}  & {\em ext} & The extension to check for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if the string has the given extension, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise.
\end{DoxyReturn}
This function does the same as \mbox{\hyperlink{group__Eina__String__Group_ga1e84de127ac0214f4983daeea3c3abf8}{eina\+\_\+str\+\_\+has\+\_\+suffix()}}, except it\textquotesingle{}s case insensitive. 

Referenced by ecore\+\_\+file\+\_\+can\+\_\+exec().

\mbox{\Hypertarget{group__Eina__String__Group_ga601dd2f2032b2a09184164db6f36cc87}\label{group__Eina__String__Group_ga601dd2f2032b2a09184164db6f36cc87}} 
\index{String@{String}!eina\_str\_split@{eina\_str\_split}}
\index{eina\_str\_split@{eina\_str\_split}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_split()}{eina\_str\_split()}}
{\footnotesize\ttfamily char$\ast$$\ast$ eina\+\_\+str\+\_\+split (\begin{DoxyParamCaption}\item[{const char $\ast$}]{string,  }\item[{const char $\ast$}]{delimiter,  }\item[{int}]{max\+\_\+tokens }\end{DoxyParamCaption})}



Splits a string using a delimiter. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em string} & The string to split. \\
\hline
\mbox{\texttt{ in}}  & {\em delimiter} & The string which specifies the places at which to split the string. \\
\hline
\mbox{\texttt{ in}}  & {\em max\+\_\+tokens} & The maximum number of strings to split string into, or a number less than 1 to split as many times as possible. This parameter IGNORES the added {\ttfamily NULL} terminator. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly-\/allocated NULL-\/terminated array of strings or {\ttfamily NULL} if it fails to allocate the array.
\end{DoxyReturn}
This function splits {\ttfamily string} into a maximum of {\ttfamily max\+\_\+tokens} pieces, using the given delimiter {\ttfamily delimiter}. {\ttfamily delimiter} is not included in any of the resulting strings, unless {\ttfamily max\+\_\+tokens} is reached. If {\ttfamily max\+\_\+tokens} is less than {\ttfamily 1}, the string is split as many times as possible. If {\ttfamily max\+\_\+tokens} is reached, the last string in the returned string array contains the remainder of string. The returned value is a newly allocated NULL-\/terminated array of strings or {\ttfamily NULL} if it fails to allocate the array. To free it, free the first element of the array and the array itself.

\begin{DoxyNote}{Note}
If you need the number of elements in the returned array see \mbox{\hyperlink{group__Eina__String__Group_gac408efa406ea8e03d0f6b989ef579a29}{eina\+\_\+str\+\_\+split\+\_\+full()}}. 
\end{DoxyNote}


Referenced by edje\+\_\+edit\+\_\+group\+\_\+copy().

\mbox{\Hypertarget{group__Eina__String__Group_gac408efa406ea8e03d0f6b989ef579a29}\label{group__Eina__String__Group_gac408efa406ea8e03d0f6b989ef579a29}} 
\index{String@{String}!eina\_str\_split\_full@{eina\_str\_split\_full}}
\index{eina\_str\_split\_full@{eina\_str\_split\_full}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_split\_full()}{eina\_str\_split\_full()}}
{\footnotesize\ttfamily char$\ast$$\ast$ eina\+\_\+str\+\_\+split\+\_\+full (\begin{DoxyParamCaption}\item[{const char $\ast$}]{string,  }\item[{const char $\ast$}]{delimiter,  }\item[{int}]{max\+\_\+tokens,  }\item[{unsigned int $\ast$}]{elements }\end{DoxyParamCaption})}



Splits a string using a delimiter and returns number of elements. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em string} & The string to split. \\
\hline
\mbox{\texttt{ in}}  & {\em delimiter} & The string which specifies the places at which to split the string. \\
\hline
\mbox{\texttt{ in}}  & {\em max\+\_\+tokens} & The maximum number of strings to split string into, or a number less than 1 to split as many times as possible. This parameter IGNORES the added {\ttfamily NULL} terminator. \\
\hline
\mbox{\texttt{ out}}  & {\em elements} & Where to return the number of elements in returned array. This array is guaranteed to be no greater than {\ttfamily max\+\_\+tokens}, and it will NOT count the {\ttfamily NULL} terminator element. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly-\/allocated NULL-\/terminated array of strings or {\ttfamily NULL} if it fails to allocate the array.
\end{DoxyReturn}
This function splits {\ttfamily string} into a maximum of {\ttfamily max\+\_\+tokens} pieces, using the given delimiter {\ttfamily delimiter}. {\ttfamily delimiter} is not included in any of the resulting strings, unless {\ttfamily max\+\_\+tokens} is reached. If {\ttfamily max\+\_\+tokens} is less than {\ttfamily 1}, the string is split as many times as possible. If {\ttfamily max\+\_\+tokens} is reached, the last string in the returned string array contains the remainder of string. The returned value is a newly allocated NULL-\/terminated array of strings or {\ttfamily NULL} if it fails to allocate the array. To free it, free the first element of the array and the array itself.

\begin{DoxyNote}{Note}
The actual size of the returned array, when {\ttfamily elements} returns greater than zero, will always be {\ttfamily elements} + 1. This is due to the {\ttfamily NULL} terminator element that is added to the array for safety. If it returns {\ttfamily 6}, the number of split strings returned will be 6, but the size of the array (including the {\ttfamily NULL} element) will actually be 7.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__String__Group_ga601dd2f2032b2a09184164db6f36cc87}{eina\+\_\+str\+\_\+split()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}\label{group__Eina__String__Group_ga78b94379522949b2f521d56e89755035}} 
\index{String@{String}!eina\_str\_join\_len@{eina\_str\_join\_len}}
\index{eina\_str\_join\_len@{eina\_str\_join\_len}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_join\_len()}{eina\_str\_join\_len()}}
{\footnotesize\ttfamily size\+\_\+t eina\+\_\+str\+\_\+join\+\_\+len (\begin{DoxyParamCaption}\item[{char $\ast$}]{dst,  }\item[{size\+\_\+t}]{size,  }\item[{char}]{sep,  }\item[{const char $\ast$}]{a,  }\item[{size\+\_\+t}]{a\+\_\+len,  }\item[{const char $\ast$}]{b,  }\item[{size\+\_\+t}]{b\+\_\+len }\end{DoxyParamCaption})}



Joins two strings of known length. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em dst} & The buffer to store the result. \\
\hline
\mbox{\texttt{ in}}  & {\em size} & Size (in byte) of the buffer. \\
\hline
\mbox{\texttt{ in}}  & {\em sep} & The separator character to use. \\
\hline
\mbox{\texttt{ in}}  & {\em a} & First string to use, before {\ttfamily sep}. \\
\hline
\mbox{\texttt{ in}}  & {\em a\+\_\+len} & Length of {\ttfamily a}. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & Second string to use, after {\ttfamily sep}. \\
\hline
\mbox{\texttt{ in}}  & {\em b\+\_\+len} & Length of {\ttfamily b}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of characters printed.
\end{DoxyReturn}
This function joins the strings {\ttfamily a} and {\ttfamily b} (in that order) and separate them with {\ttfamily sep}. The result is stored in the buffer {\ttfamily dst} and at most {\ttfamily size} -\/ 1 characters will be written and the string is NULL-\/terminated. {\ttfamily a\+\_\+len} is the length of {\ttfamily a} (not including \textquotesingle{}\textbackslash{}0\textquotesingle{}) and {\ttfamily b\+\_\+len} is the length of {\ttfamily b} (not including \textquotesingle{}\textbackslash{}0\textquotesingle{}). This function returns the number of characters printed (not including the trailing \textquotesingle{}\textbackslash{}0\textquotesingle{} used to end output to strings). Just like snprintf(), it will not write more than {\ttfamily size} bytes, thus a returned value of {\ttfamily size} or more means that the output was truncated.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__String__Group_ga3b03fc33ef07b92d442e07b3901933ed}{eina\+\_\+str\+\_\+join()}} 

\mbox{\hyperlink{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}{eina\+\_\+str\+\_\+join\+\_\+static()}} 
\end{DoxySeeAlso}


Referenced by eina\+\_\+str\+\_\+join().

\mbox{\Hypertarget{group__Eina__String__Group_ga0af68ae392f4167f3ab77142ce9fee31}\label{group__Eina__String__Group_ga0af68ae392f4167f3ab77142ce9fee31}} 
\index{String@{String}!eina\_str\_convert@{eina\_str\_convert}}
\index{eina\_str\_convert@{eina\_str\_convert}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_convert()}{eina\_str\_convert()}}
{\footnotesize\ttfamily char$\ast$ eina\+\_\+str\+\_\+convert (\begin{DoxyParamCaption}\item[{const char $\ast$}]{enc\+\_\+from,  }\item[{const char $\ast$}]{enc\+\_\+to,  }\item[{const char $\ast$}]{text }\end{DoxyParamCaption})}



Uses Iconv to convert a text string from one encoding to another. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em enc\+\_\+from} & Encoding to convert from. \\
\hline
\mbox{\texttt{ in}}  & {\em enc\+\_\+to} & Encoding to convert to. \\
\hline
\mbox{\texttt{ in}}  & {\em text} & The text to convert. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The converted text.
\end{DoxyReturn}
This function converts {\ttfamily text}, encoded in {\ttfamily enc\+\_\+from}. On success, the converted text is returned and is encoded in {\ttfamily enc\+\_\+to}. On failure, {\ttfamily NULL} is returned. Iconv is used to convert {\ttfamily text}. If Iconv is not available, {\ttfamily NULL} is returned. When not used anymore, the returned value must be freed.

\begin{DoxyWarning}{Warning}
This function is guaranteed to break when \textquotesingle{}\textbackslash{}0\textquotesingle{} characters are in {\ttfamily text}. DO NOT USE THIS FUNCTION IF YOUR TEXT CONTAINS NON-\/\+TERMINATING \textquotesingle{}\textbackslash{}0\textquotesingle{} CHARACTERS. 
\end{DoxyWarning}
\mbox{\Hypertarget{group__Eina__String__Group_ga195158809644151a25cae50c2c30468c}\label{group__Eina__String__Group_ga195158809644151a25cae50c2c30468c}} 
\index{String@{String}!eina\_str\_convert\_len@{eina\_str\_convert\_len}}
\index{eina\_str\_convert\_len@{eina\_str\_convert\_len}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_convert\_len()}{eina\_str\_convert\_len()}}
{\footnotesize\ttfamily char$\ast$ eina\+\_\+str\+\_\+convert\+\_\+len (\begin{DoxyParamCaption}\item[{const char $\ast$}]{enc\+\_\+from,  }\item[{const char $\ast$}]{enc\+\_\+to,  }\item[{const char $\ast$}]{text,  }\item[{size\+\_\+t}]{len,  }\item[{size\+\_\+t $\ast$}]{retlen }\end{DoxyParamCaption})}



Uses Iconv to convert a text string from one encoding to another. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em enc\+\_\+from} & Encoding to convert from. \\
\hline
\mbox{\texttt{ in}}  & {\em enc\+\_\+to} & Encoding to convert to. \\
\hline
\mbox{\texttt{ in}}  & {\em text} & The text to convert. \\
\hline
\mbox{\texttt{ in}}  & {\em len} & The size in bytes of the text to convert. \\
\hline
\mbox{\texttt{ in}}  & {\em retlen} & The size in bytes of the converted text. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The converted text.
\end{DoxyReturn}
This function converts {\ttfamily text}, encoded in {\ttfamily enc\+\_\+from}. On success, the converted text is returned and is encoded in {\ttfamily enc\+\_\+to}. On failure, {\ttfamily NULL} is returned. Iconv is used to convert {\ttfamily text}. If Iconv is not available, {\ttfamily NULL} is returned. When not used anymore, the returned value must be freed.

\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__String__Group_ga3bef18659d548f869e887f1172368c96}\label{group__Eina__String__Group_ga3bef18659d548f869e887f1172368c96}} 
\index{String@{String}!eina\_str\_escape@{eina\_str\_escape}}
\index{eina\_str\_escape@{eina\_str\_escape}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_escape()}{eina\_str\_escape()}}
{\footnotesize\ttfamily char$\ast$ eina\+\_\+str\+\_\+escape (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str }\end{DoxyParamCaption})}



Escapes slashes, spaces and apostrophes in strings. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & The string to escape. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The escaped string.
\end{DoxyReturn}
Escaping is done by adding a slash \char`\"{}\textbackslash{}\char`\"{} before any occurrence of slashes \char`\"{}\textbackslash{}\char`\"{} include \char`\"{}\textbackslash{}n\char`\"{} and \char`\"{}\textbackslash{}t\char`\"{}, spaces \char`\"{} \char`\"{}, apostrophes \char`\"{}\textquotesingle{}\char`\"{} or quotes \char`\"{}\char`\"{}"{}. This function returns a newly allocated escaped string on success, {\ttfamily NULL} on failure. When not used anymore, the returned value must be freed. 

Referenced by edje\+\_\+edit\+\_\+data\+\_\+source\+\_\+generate(), and edje\+\_\+fontset\+\_\+append\+\_\+set().

\mbox{\Hypertarget{group__Eina__String__Group_ga0909a116b1d8e9e8d8836f646ac8a2f1}\label{group__Eina__String__Group_ga0909a116b1d8e9e8d8836f646ac8a2f1}} 
\index{String@{String}!eina\_str\_tolower@{eina\_str\_tolower}}
\index{eina\_str\_tolower@{eina\_str\_tolower}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_tolower()}{eina\_str\_tolower()}}
{\footnotesize\ttfamily void eina\+\_\+str\+\_\+tolower (\begin{DoxyParamCaption}\item[{char $\ast$$\ast$}]{str }\end{DoxyParamCaption})}



Lowercases all the characters in range \mbox{[}A-\/Z\mbox{]} in the given string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em str} & The string to lowercase.\\
\hline
\end{DoxyParams}
This function modifies the original string, changing all characters in \mbox{[}A-\/Z\mbox{]} to lowercase. If {\ttfamily str} is {\ttfamily NULL} or is an empty string, this function does nothing. 

Referenced by eina\+\_\+strbuf\+\_\+tolower().

\mbox{\Hypertarget{group__Eina__String__Group_ga82c8c194203522f702a6f73570b1220a}\label{group__Eina__String__Group_ga82c8c194203522f702a6f73570b1220a}} 
\index{String@{String}!eina\_str\_toupper@{eina\_str\_toupper}}
\index{eina\_str\_toupper@{eina\_str\_toupper}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_str\_toupper()}{eina\_str\_toupper()}}
{\footnotesize\ttfamily void eina\+\_\+str\+\_\+toupper (\begin{DoxyParamCaption}\item[{char $\ast$$\ast$}]{str }\end{DoxyParamCaption})}



Uppercases all the characters in range \mbox{[}a-\/z\mbox{]} in the given string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em str} & The string to uppercase.\\
\hline
\end{DoxyParams}
This function modifies the original string, changing all characters in \mbox{[}a-\/z\mbox{]} to uppercase. If {\ttfamily str} is {\ttfamily NULL} or is an empty string, this function does nothing. \mbox{\Hypertarget{group__Eina__String__Group_gad63239b52af915783af40bca8657e9d1}\label{group__Eina__String__Group_gad63239b52af915783af40bca8657e9d1}} 
\index{String@{String}!eina\_memdup@{eina\_memdup}}
\index{eina\_memdup@{eina\_memdup}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_memdup()}{eina\_memdup()}}
{\footnotesize\ttfamily unsigned char$\ast$ eina\+\_\+memdup (\begin{DoxyParamCaption}\item[{unsigned char $\ast$}]{mem,  }\item[{size\+\_\+t}]{size,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}}]{terminate }\end{DoxyParamCaption})}



Memory duplication function with optional termination for strings. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em mem} & The memory to copy \\
\hline
\mbox{\texttt{ in}}  & {\em size} & The size of {\ttfamily mem} \\
\hline
\mbox{\texttt{ in}}  & {\em terminate} & If true, the returned memory will be nul terminated with \textquotesingle{}\textbackslash{}0\textquotesingle{} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The copied memory, must be freed 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+13 
\end{DoxySince}


Referenced by elm\+\_\+cnp\+\_\+selection\+\_\+set().

\mbox{\Hypertarget{group__Eina__String__Group_ga22fd9902b22809e9afcf9feaec7a3b36}\label{group__Eina__String__Group_ga22fd9902b22809e9afcf9feaec7a3b36}} 
\index{String@{String}!eina\_strftime@{eina\_strftime}}
\index{eina\_strftime@{eina\_strftime}!String@{String}}
\doxysubsubsection{\texorpdfstring{eina\_strftime()}{eina\_strftime()}}
{\footnotesize\ttfamily char$\ast$ eina\+\_\+strftime (\begin{DoxyParamCaption}\item[{const char $\ast$}]{format,  }\item[{const struct tm $\ast$}]{tm }\end{DoxyParamCaption})}



Creates and update the buffer based on strftime output. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em tm} & Pointer to a tm structure needed by strftime. \\
\hline
\mbox{\texttt{ in}}  & {\em format} & String containing format specifiers needed by strftime. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Updated buffer based on strftime output
\end{DoxyReturn}
This will create a buffer of exact required size based on strftime output once use is complete the buffer has to be freed using free.

Example usage\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{time\_t curr\_time;}
\DoxyCodeLine{\textcolor{keyword}{struct }tm *info;}
\DoxyCodeLine{\textcolor{keywordtype}{char} *buf;}
\DoxyCodeLine{curr\_time = time(NULL);}
\DoxyCodeLine{info = localtime(\&curr\_time);}
\DoxyCodeLine{buf = \mbox{\hyperlink{group__Eina__String__Group_ga22fd9902b22809e9afcf9feaec7a3b36}{eina\_strftime}}(\textcolor{stringliteral}{"{}\%I:\%M\%p"{}}, info);}
\DoxyCodeLine{\textcolor{comment}{//after use}}
\DoxyCodeLine{free(buf);}

\end{DoxyCode}


\begin{DoxySince}{Since}
1.\+17.\+0 
\end{DoxySince}


Referenced by eina\+\_\+strbuf\+\_\+append\+\_\+strftime(), and eina\+\_\+strbuf\+\_\+insert\+\_\+strftime().

