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


Provide useful functions for C string manipulation.  


\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}{eina\+\_\+str\+\_\+join\+\_\+static}(dst, sep, a, b)~\hyperlink{group__Eina__String__Group_ga24948e6a270ad2e574dda5b97012cb41}{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 Join two static strings and store the result in a static buffer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__String__Group_ga6bda31d2e1b6d2737b7fe1784780cd2f}{eina\+\_\+strlcpy} (char $\ast$dst, const char $\ast$src, size\+\_\+t siz) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Copy a c-\/string to another. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__String__Group_ga6c9583940f9f6b3c886a19f22f398ff2}{eina\+\_\+strlcat} (char $\ast$dst, const char $\ast$src, size\+\_\+t siz) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Append a c-\/string. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \\*
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__String__Group_ga785b13b56a1f7c11086954ce676487b5}{eina\+\_\+str\+\_\+has\+\_\+prefix} (const char $\ast$str, const char $\ast$prefix) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\+I\+N\+A\+\_\+\+P\+U\+R\+E} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Check if the given string has the given prefix. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__String__Group_gafe3b6abced87d088ea993456e3d2db82}{eina\+\_\+str\+\_\+has\+\_\+suffix} (const char $\ast$str, const char $\ast$suffix) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\+I\+N\+A\+\_\+\+P\+U\+R\+E} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Check if the given string has the given suffix. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__String__Group_ga567e0b37fa2f30f95450ab5aa355445a}{eina\+\_\+str\+\_\+has\+\_\+extension} (const char $\ast$str, const char $\ast$ext) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\+I\+N\+A\+\_\+\+P\+U\+R\+E} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Check if the given string has the given extension. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} char $\ast$$\ast$ \hyperlink{group__Eina__String__Group_ga9001881b16684398e4e05bc537a8c1b6}{eina\+\_\+str\+\_\+split} (const char $\ast$string, const char $\ast$delimiter, int max\+\_\+tokens) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Split a string using a delimiter. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} char $\ast$$\ast$ \hyperlink{group__Eina__String__Group_ga751453922d5e101ca209a801b066d50f}{eina\+\_\+str\+\_\+split\+\_\+full} (const char $\ast$string, const char $\ast$delimiter, int max\+\_\+tokens, unsigned int $\ast$elements) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Split a string using a delimiter and returns number of elements. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__String__Group_ga24948e6a270ad2e574dda5b97012cb41}{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) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Join two strings of known length. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} char $\ast$ \hyperlink{group__Eina__String__Group_gadf4f2532f9f93bade37c4bf09fd775f2}{eina\+\_\+str\+\_\+convert} (const char $\ast$enc\+\_\+from, const char $\ast$enc\+\_\+to, const char $\ast$text) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T} \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Use Iconv to convert a text string from one encoding to another. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} char \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} char $\ast$ \hyperlink{group__Eina__String__Group_gad0c3e5b5b7c8b5d3b9af850219b2a7f0}{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) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T} \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1
\begin{DoxyCompactList}\small\item\em Use Iconv to convert a text string from one encoding to another. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} char \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \\*
char \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} char $\ast$ \hyperlink{group__Eina__String__Group_ga96760f2bf2d845b4abec0e95f08271bd}{eina\+\_\+str\+\_\+escape} (const char $\ast$str) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T} \hyperlink{group__Eina__Types__Group_gaabeaa41dd47f4b4d3991b10ba00bc59c}{E\+I\+N\+A\+\_\+\+M\+A\+L\+L\+O\+C} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Escape slashes, spaces and apostrophes in strings. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__String__Group_ga1a0b1b2c6f082e19c9918fb2c428c849}{eina\+\_\+str\+\_\+tolower} (char $\ast$$\ast$str)
\begin{DoxyCompactList}\small\item\em Lowercase all the characters in range \mbox{[}A-\/\+Z\mbox{]} in the given string. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__String__Group_ga93d69385f153eba439faf9d5292af85f}{eina\+\_\+str\+\_\+toupper} (char $\ast$$\ast$str)
\begin{DoxyCompactList}\small\item\em Uppercase all the characters in range \mbox{[}a-\/z\mbox{]} in the given string. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__String__Group_ga7e0ea986c2346b0fdf6ab9846c090891}{static size\+\_\+t {\bfseries eina\+\_\+str\+\_\+join} (char $\ast$dst, size\+\_\+t size, char sep, const char $\ast$a, const char $\ast$b) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1}\label{group__Eina__String__Group_ga7e0ea986c2346b0fdf6ab9846c090891}

\item 
\hypertarget{group__Eina__String__Group_gad93c54d008e336005b6cb6b858769b18}{static size\+\_\+t {\bfseries eina\+\_\+strlen\+\_\+bounded} (const char $\ast$str, size\+\_\+t maxlen) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\+I\+N\+A\+\_\+\+P\+U\+R\+E} \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T} \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)}\label{group__Eina__String__Group_gad93c54d008e336005b6cb6b858769b18}

\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__String__Group_ga4c981a2ef416078954c583a0940f5aae}{\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \\*
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T}}\label{group__Eina__String__Group_ga4c981a2ef416078954c583a0940f5aae}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Provide 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't be used with shared strings(eina\+\_\+stringshare).
\end{DoxyWarning}
See an example \hyperlink{tutorial_eina_string}{here}. 

\subsection{Macro Definition Documentation}
\hypertarget{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}}
\subsubsection[{eina\+\_\+str\+\_\+join\+\_\+static}]{\setlength{\rightskip}{0pt plus 5cm}\#define eina\+\_\+str\+\_\+join\+\_\+static(
\begin{DoxyParamCaption}
\item[{}]{dst, }
\item[{}]{sep, }
\item[{}]{a, }
\item[{}]{b}
\end{DoxyParamCaption}
)~{\bf eina\+\_\+str\+\_\+join\+\_\+len}(dst, sizeof(dst), sep, a, (sizeof(a) $>$ 0) ? sizeof(a) -\/ 1 \+: 0, b, (sizeof(b) $>$ 0) ? sizeof(b) -\/ 1 \+: 0)}}\label{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}


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


\begin{DoxyParams}{Parameters}
{\em dst} & The buffer to store the result. \\
\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 \hyperlink{group__Eina__String__Group_ga24948e6a270ad2e574dda5b97012cb41}{eina\+\_\+str\+\_\+join\+\_\+len()}, but will assume string sizes are know using sizeof(\+X).

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

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


\subsection{Function Documentation}
\hypertarget{group__Eina__String__Group_ga6bda31d2e1b6d2737b7fe1784780cd2f}{\index{String@{String}!eina\+\_\+strlcpy@{eina\+\_\+strlcpy}}
\index{eina\+\_\+strlcpy@{eina\+\_\+strlcpy}!String@{String}}
\subsubsection[{eina\+\_\+strlcpy}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} size\+\_\+t eina\+\_\+strlcpy (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{dst, }
\item[{const char $\ast$}]{src, }
\item[{size\+\_\+t}]{siz}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga6bda31d2e1b6d2737b7fe1784780cd2f}


Copy a c-\/string to another. 


\begin{DoxyParams}{Parameters}
{\em dst} & The destination string. \\
\hline
{\em src} & The source string. \\
\hline
{\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 N\+U\+L\+L-\/terminated string {\ttfamily src} to {\ttfamily dst}, N\+U\+L\+L-\/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 N\+U\+L\+L-\/terminated even if no {\ttfamily N\+U\+L\+L} byte is found in the first {\ttfamily siz} bytes of src. 
\end{DoxyNote}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eet-data-file_descriptor_01_8c-example}{eet-\/data-\/file\+\_\+descriptor\+\_\+01.\+c}, \hyperlink{eet-data-file_descriptor_02_8c-example}{eet-\/data-\/file\+\_\+descriptor\+\_\+02.\+c}, \hyperlink{eet-data-nested_8c-example}{eet-\/data-\/nested.\+c}, \hyperlink{eet-data-simple_8c-example}{eet-\/data-\/simple.\+c}, and \hyperlink{eina_str_01_8c-example}{eina\+\_\+str\+\_\+01.\+c}.\end{Desc}


Referenced by ecore\+\_\+file\+\_\+mksubdirs().

\hypertarget{group__Eina__String__Group_ga6c9583940f9f6b3c886a19f22f398ff2}{\index{String@{String}!eina\+\_\+strlcat@{eina\+\_\+strlcat}}
\index{eina\+\_\+strlcat@{eina\+\_\+strlcat}!String@{String}}
\subsubsection[{eina\+\_\+strlcat}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} size\+\_\+t {\bf E\+A\+P\+I} size\+\_\+t eina\+\_\+strlcat (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{dst, }
\item[{const char $\ast$}]{src, }
\item[{size\+\_\+t}]{siz}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga6c9583940f9f6b3c886a19f22f398ff2}


Append a c-\/string. 


\begin{DoxyParams}{Parameters}
{\em dst} & The destination string. \\
\hline
{\em src} & The source string. \\
\hline
{\em siz} & The size of the destination string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The length of the source string plus M\+I\+N(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 N\+U\+L\+L-\/terminates (unless {\ttfamily siz} $<$= strlen(dst)). This function returns strlen(src) + M\+I\+N(siz, strlen(initial dst)). If the returned value is greater or equal than {\ttfamily siz}, truncation occurred. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_str_01_8c-example}{eina\+\_\+str\+\_\+01.\+c}.\end{Desc}
\hypertarget{group__Eina__String__Group_ga785b13b56a1f7c11086954ce676487b5}{\index{String@{String}!eina\+\_\+str\+\_\+has\+\_\+prefix@{eina\+\_\+str\+\_\+has\+\_\+prefix}}
\index{eina\+\_\+str\+\_\+has\+\_\+prefix@{eina\+\_\+str\+\_\+has\+\_\+prefix}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+has\+\_\+prefix}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} size\+\_\+t {\bf E\+A\+P\+I} size\+\_\+t {\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+str\+\_\+has\+\_\+prefix (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{prefix}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga785b13b56a1f7c11086954ce676487b5}


Check if the given string has the given prefix. 


\begin{DoxyParams}{Parameters}
{\em str} & The string to work with. \\
\hline
{\em prefix} & The prefix to check for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if the string has the given prefix, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function returns \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if {\ttfamily str} has the prefix {\ttfamily prefix}, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise. If the length of {\ttfamily prefix} is greater than {\ttfamily str}, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} is returned. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_str_01_8c-example}{eina\+\_\+str\+\_\+01.\+c}.\end{Desc}
\hypertarget{group__Eina__String__Group_gafe3b6abced87d088ea993456e3d2db82}{\index{String@{String}!eina\+\_\+str\+\_\+has\+\_\+suffix@{eina\+\_\+str\+\_\+has\+\_\+suffix}}
\index{eina\+\_\+str\+\_\+has\+\_\+suffix@{eina\+\_\+str\+\_\+has\+\_\+suffix}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+has\+\_\+suffix}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+str\+\_\+has\+\_\+suffix (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{suffix}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_gafe3b6abced87d088ea993456e3d2db82}


Check if the given string has the given suffix. 


\begin{DoxyParams}{Parameters}
{\em str} & The string to work with. \\
\hline
{\em suffix} & The suffix to check for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if the string has the given suffix, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function returns \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if {\ttfamily str} has the suffix {\ttfamily suffix}, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise. If the length of {\ttfamily suffix} is greater than {\ttfamily str}, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} is returned. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_str_01_8c-example}{eina\+\_\+str\+\_\+01.\+c}.\end{Desc}
\hypertarget{group__Eina__String__Group_ga567e0b37fa2f30f95450ab5aa355445a}{\index{String@{String}!eina\+\_\+str\+\_\+has\+\_\+extension@{eina\+\_\+str\+\_\+has\+\_\+extension}}
\index{eina\+\_\+str\+\_\+has\+\_\+extension@{eina\+\_\+str\+\_\+has\+\_\+extension}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+has\+\_\+extension}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Bool} eina\+\_\+str\+\_\+has\+\_\+extension (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{const char $\ast$}]{ext}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga567e0b37fa2f30f95450ab5aa355445a}


Check if the given string has the given extension. 


\begin{DoxyParams}{Parameters}
{\em str} & The string to work with. \\
\hline
{\em ext} & The extension to check for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if the string has the given extension, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function does the same as \hyperlink{group__Eina__String__Group_gafe3b6abced87d088ea993456e3d2db82}{eina\+\_\+str\+\_\+has\+\_\+suffix()}, except it's case insensitive. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_str_01_8c-example}{eina\+\_\+str\+\_\+01.\+c}.\end{Desc}
\hypertarget{group__Eina__String__Group_ga9001881b16684398e4e05bc537a8c1b6}{\index{String@{String}!eina\+\_\+str\+\_\+split@{eina\+\_\+str\+\_\+split}}
\index{eina\+\_\+str\+\_\+split@{eina\+\_\+str\+\_\+split}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+split}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} char$\ast$$\ast$ eina\+\_\+str\+\_\+split (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{string, }
\item[{const char $\ast$}]{delimiter, }
\item[{int}]{max\+\_\+tokens}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga9001881b16684398e4e05bc537a8c1b6}


Split a string using a delimiter. 


\begin{DoxyParams}{Parameters}
{\em string} & The string to split. \\
\hline
{\em delimiter} & The string which specifies the places at which to split the string. \\
\hline
{\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 I\+G\+N\+O\+R\+E\+S the added {\ttfamily N\+U\+L\+L} terminator. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly-\/allocated N\+U\+L\+L-\/terminated array of strings or {\ttfamily N\+U\+L\+L} 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 splitted 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 N\+U\+L\+L-\/terminated array of strings or {\ttfamily N\+U\+L\+L} 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 \hyperlink{group__Eina__String__Group_ga751453922d5e101ca209a801b066d50f}{eina\+\_\+str\+\_\+split\+\_\+full()}. 
\end{DoxyNote}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_str_01_8c-example}{eina\+\_\+str\+\_\+01.\+c}.\end{Desc}


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

\hypertarget{group__Eina__String__Group_ga751453922d5e101ca209a801b066d50f}{\index{String@{String}!eina\+\_\+str\+\_\+split\+\_\+full@{eina\+\_\+str\+\_\+split\+\_\+full}}
\index{eina\+\_\+str\+\_\+split\+\_\+full@{eina\+\_\+str\+\_\+split\+\_\+full}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+split\+\_\+full}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} 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}
)}}\label{group__Eina__String__Group_ga751453922d5e101ca209a801b066d50f}


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


\begin{DoxyParams}{Parameters}
{\em string} & The string to split. \\
\hline
{\em delimiter} & The string which specifies the places at which to split the string. \\
\hline
{\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 I\+G\+N\+O\+R\+E\+S the added {\ttfamily N\+U\+L\+L} terminator. \\
\hline
{\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 N\+O\+T count the {\ttfamily N\+U\+L\+L} terminator element. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A newly-\/allocated N\+U\+L\+L-\/terminated array of strings or {\ttfamily N\+U\+L\+L} 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 splitted 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 N\+U\+L\+L-\/terminated array of strings or {\ttfamily N\+U\+L\+L} 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 N\+U\+L\+L} 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 N\+U\+L\+L} element) will actually be 7.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__String__Group_ga9001881b16684398e4e05bc537a8c1b6}{eina\+\_\+str\+\_\+split()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__String__Group_ga24948e6a270ad2e574dda5b97012cb41}{\index{String@{String}!eina\+\_\+str\+\_\+join\+\_\+len@{eina\+\_\+str\+\_\+join\+\_\+len}}
\index{eina\+\_\+str\+\_\+join\+\_\+len@{eina\+\_\+str\+\_\+join\+\_\+len}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+join\+\_\+len}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} 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}
)}}\label{group__Eina__String__Group_ga24948e6a270ad2e574dda5b97012cb41}


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 a\+\_\+len} & length of {\ttfamily a}. \\
\hline
{\em b} & Second string to use, after {\ttfamily sep}. \\
\hline
{\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 N\+U\+L\+L-\/terminated. {\ttfamily a\+\_\+len} is the length of {\ttfamily a} (not including '\textbackslash{}0') and {\ttfamily b\+\_\+len} is the length of {\ttfamily b} (not including '\textbackslash{}0'). This function returns the number of characters printed (not including the trailing '\textbackslash{}0' 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}
eina\+\_\+str\+\_\+join() 

\hyperlink{group__Eina__String__Group_gafe8d21bb68ce3a4a26ffb3cfe4321184}{eina\+\_\+str\+\_\+join\+\_\+static()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_str_01_8c-example}{eina\+\_\+str\+\_\+01.\+c}.\end{Desc}
\hypertarget{group__Eina__String__Group_gadf4f2532f9f93bade37c4bf09fd775f2}{\index{String@{String}!eina\+\_\+str\+\_\+convert@{eina\+\_\+str\+\_\+convert}}
\index{eina\+\_\+str\+\_\+convert@{eina\+\_\+str\+\_\+convert}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+convert}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} size\+\_\+t {\bf E\+A\+P\+I} 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}
)}}\label{group__Eina__String__Group_gadf4f2532f9f93bade37c4bf09fd775f2}


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


\begin{DoxyParams}{Parameters}
{\em enc\+\_\+from} & Encoding to convert from. \\
\hline
{\em enc\+\_\+to} & Encoding to convert to. \\
\hline
{\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 N\+U\+L\+L} is returned. Iconv is used to convert {\ttfamily text}. If Iconv is not available, {\ttfamily N\+U\+L\+L} is returned. When not used anymore, the returned value must be freed.

\begin{DoxyWarning}{Warning}
This function is guaranteed to break when '\textbackslash{}0' characters are in {\ttfamily text}. D\+O N\+O\+T U\+S\+E T\+H\+I\+S F\+U\+N\+C\+T\+I\+O\+N I\+F Y\+O\+U\+R T\+E\+X\+T C\+O\+N\+T\+A\+I\+N\+S N\+O\+N-\/\+T\+E\+R\+M\+I\+N\+A\+T\+I\+N\+G '\textbackslash{}0' C\+H\+A\+R\+A\+C\+T\+E\+R\+S. 
\end{DoxyWarning}
\hypertarget{group__Eina__String__Group_gad0c3e5b5b7c8b5d3b9af850219b2a7f0}{\index{String@{String}!eina\+\_\+str\+\_\+convert\+\_\+len@{eina\+\_\+str\+\_\+convert\+\_\+len}}
\index{eina\+\_\+str\+\_\+convert\+\_\+len@{eina\+\_\+str\+\_\+convert\+\_\+len}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+convert\+\_\+len}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} size\+\_\+t {\bf E\+A\+P\+I} char {\bf E\+A\+P\+I} 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}
)}}\label{group__Eina__String__Group_gad0c3e5b5b7c8b5d3b9af850219b2a7f0}


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


\begin{DoxyParams}{Parameters}
{\em enc\+\_\+from} & Encoding to convert from. \\
\hline
{\em enc\+\_\+to} & Encoding to convert to. \\
\hline
{\em text} & The text to convert. \\
\hline
{\em len} & The size in bytes of the text to convert. \\
\hline
{\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 N\+U\+L\+L} is returned. Iconv is used to convert {\ttfamily text}. If Iconv is not available, {\ttfamily N\+U\+L\+L} is returned. When not used anymore, the returned value must be freed.

\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\hypertarget{group__Eina__String__Group_ga96760f2bf2d845b4abec0e95f08271bd}{\index{String@{String}!eina\+\_\+str\+\_\+escape@{eina\+\_\+str\+\_\+escape}}
\index{eina\+\_\+str\+\_\+escape@{eina\+\_\+str\+\_\+escape}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+escape}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} size\+\_\+t {\bf E\+A\+P\+I} char {\bf E\+A\+P\+I} char {\bf E\+A\+P\+I} char$\ast$ eina\+\_\+str\+\_\+escape (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga96760f2bf2d845b4abec0e95f08271bd}


Escape slashes, spaces and apostrophes in strings. 


\begin{DoxyParams}{Parameters}
{\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`\"{}, spaces \char`\"{} \char`\"{} or apostrophes \char`\"{}'\char`\"{}. This function returns a newly allocated escaped string on success, {\ttfamily N\+U\+L\+L} on failure. When not used anymore, the returned value must be freed. \hypertarget{group__Eina__String__Group_ga1a0b1b2c6f082e19c9918fb2c428c849}{\index{String@{String}!eina\+\_\+str\+\_\+tolower@{eina\+\_\+str\+\_\+tolower}}
\index{eina\+\_\+str\+\_\+tolower@{eina\+\_\+str\+\_\+tolower}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+tolower}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void eina\+\_\+str\+\_\+tolower (
\begin{DoxyParamCaption}
\item[{char $\ast$$\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga1a0b1b2c6f082e19c9918fb2c428c849}


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


\begin{DoxyParams}{Parameters}
{\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 N\+U\+L\+L} or is an empty string, this function does nothing. \hypertarget{group__Eina__String__Group_ga93d69385f153eba439faf9d5292af85f}{\index{String@{String}!eina\+\_\+str\+\_\+toupper@{eina\+\_\+str\+\_\+toupper}}
\index{eina\+\_\+str\+\_\+toupper@{eina\+\_\+str\+\_\+toupper}!String@{String}}
\subsubsection[{eina\+\_\+str\+\_\+toupper}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void eina\+\_\+str\+\_\+toupper (
\begin{DoxyParamCaption}
\item[{char $\ast$$\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__String__Group_ga93d69385f153eba439faf9d5292af85f}


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


\begin{DoxyParams}{Parameters}
{\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 N\+U\+L\+L} or is an empty string, this function does nothing. 