\hypertarget{group__Evas__Utils}{\section{General Utilities}
\label{group__Evas__Utils}\index{General Utilities@{General Utilities}}
}


Some functions that are handy but are not specific of canvas or objects.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
const char $\ast$ \hyperlink{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}{evas\-\_\-load\-\_\-error\-\_\-str} (Evas\-\_\-\-Load\-\_\-\-Error error)
\begin{DoxyCompactList}\small\item\em Converts the given Evas image load error code into a string describing it in english. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Utils_ga143f983570c36917783a6b1a3b341bf5}{evas\-\_\-color\-\_\-hsv\-\_\-to\-\_\-rgb} (float h, float s, float v, int $\ast$r, int $\ast$g, int $\ast$b)
\begin{DoxyCompactList}\small\item\em Convert a given color from H\-S\-V to R\-G\-B format. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Utils_gaa8711329d10e34fc8a3221598afe7a91}{evas\-\_\-color\-\_\-rgb\-\_\-to\-\_\-hsv} (int r, int g, int b, float $\ast$h, float $\ast$s, float $\ast$v)
\begin{DoxyCompactList}\small\item\em Convert a given color from R\-G\-B to H\-S\-V format. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Utils_gac02bf3973675ae7591b9f34deef1554f}{evas\-\_\-color\-\_\-argb\-\_\-premul} (int a, int $\ast$r, int $\ast$g, int $\ast$b)
\begin{DoxyCompactList}\small\item\em Pre-\/multiplies a rgb triplet by an alpha factor. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Utils_ga862abed1097a429dd439fbe08813cd9d}{evas\-\_\-color\-\_\-argb\-\_\-unpremul} (int a, int $\ast$r, int $\ast$g, int $\ast$b)
\begin{DoxyCompactList}\small\item\em Undo pre-\/multiplication of a rgb triplet by an alpha factor. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Utils_ga6728112a26090165c5e4a1a6bf71ffb1}{evas\-\_\-data\-\_\-argb\-\_\-premul} (unsigned int $\ast$data, unsigned int len)
\begin{DoxyCompactList}\small\item\em Pre-\/multiplies data by an alpha factor. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Utils_gafdab034f277f25c3cd0195f4e7fbb38d}{evas\-\_\-data\-\_\-argb\-\_\-unpremul} (unsigned int $\ast$data, unsigned int len)
\begin{DoxyCompactList}\small\item\em Undo pre-\/multiplication data by an alpha factor. \end{DoxyCompactList}\item 
int \hyperlink{group__Evas__Utils_ga044cd250a33c2d994b2c5d3d31e3f413}{evas\-\_\-string\-\_\-char\-\_\-next\-\_\-get} (const char $\ast$str, int pos, int $\ast$decoded)
\begin{DoxyCompactList}\small\item\em Gets the next character in the string. \end{DoxyCompactList}\item 
int \hyperlink{group__Evas__Utils_gab7c9b92ab4ccb14a3391f1fa884bae24}{evas\-\_\-string\-\_\-char\-\_\-prev\-\_\-get} (const char $\ast$str, int pos, int $\ast$decoded)
\begin{DoxyCompactList}\small\item\em Gets the previous character in the string. \end{DoxyCompactList}\item 
int \hyperlink{group__Evas__Utils_gadfcfcae8546f2d7f6c14c5e1b17b8446}{evas\-\_\-string\-\_\-char\-\_\-len\-\_\-get} (const char $\ast$str)
\begin{DoxyCompactList}\small\item\em Get the length in characters of the string. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Some functions that are handy but are not specific of canvas or objects. 

\subsection{Function Documentation}
\hypertarget{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}{\index{General Utilities@{General Utilities}!evas\-\_\-load\-\_\-error\-\_\-str@{evas\-\_\-load\-\_\-error\-\_\-str}}
\index{evas\-\_\-load\-\_\-error\-\_\-str@{evas\-\_\-load\-\_\-error\-\_\-str}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-load\-\_\-error\-\_\-str}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ evas\-\_\-load\-\_\-error\-\_\-str (
\begin{DoxyParamCaption}
\item[{Evas\-\_\-\-Load\-\_\-\-Error}]{error}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}


Converts the given Evas image load error code into a string describing it in english. 


\begin{DoxyParams}{Parameters}
{\em error} & the error code, a value in \-::\-Evas\-\_\-\-Load\-\_\-\-Error. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Always returns a valid string. If the given {\ttfamily error} is not supported, {\ttfamily \char`\"{}\-Unknown error\char`\"{}} is returned.
\end{DoxyReturn}
Mostly \hyperlink{group__Evas__Object__Image_ga805c898028d2626ab72f57c1dd3272a1}{evas\-\_\-object\-\_\-image\-\_\-file\-\_\-set()} would be the function setting that error value afterwards, but also evas\-\_\-object\-\_\-image\-\_\-load(), \hyperlink{group__Evas__Object__Image_gac73322fe7b59dd70cc68d2732b55980a}{evas\-\_\-object\-\_\-image\-\_\-save()}, \hyperlink{group__Evas__Object__Image_ga1d4b8d75d899b4fadcbdfd4b4abb924f}{evas\-\_\-object\-\_\-image\-\_\-data\-\_\-get()}, \hyperlink{group__Evas__Object__Image_ga89762ac3a9adb20e5e969e8abd66a8f8}{evas\-\_\-object\-\_\-image\-\_\-data\-\_\-convert()}, \hyperlink{group__Evas__Object__Image_ga51ef08da0d9c7211ed06af9fac98838d}{evas\-\_\-object\-\_\-image\-\_\-pixels\-\_\-import()} and evas\-\_\-object\-\_\-image\-\_\-is\-\_\-inside(). This function is meant to be used in conjunction with \hyperlink{group__Evas__Object__Image_ga5a1eec674128f5d1365e80d628ad2bc3}{evas\-\_\-object\-\_\-image\-\_\-load\-\_\-error\-\_\-get()}, as in\-:

Example code\-:  
\begin{DoxyCodeInclude}
   d.img1 = \hyperlink{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}{evas\_object\_image\_add}(d.evas);
   \hyperlink{group__Evas__Object__Image_ga805c898028d2626ab72f57c1dd3272a1}{evas\_object\_image\_file\_set}(d.img1, valid\_path, NULL);
   err = \hyperlink{group__Evas__Object__Image_ga5a1eec674128f5d1365e80d628ad2bc3}{evas\_object\_image\_load\_error\_get}(d.img1);
   \textcolor{keywordflow}{if} (err != EVAS\_LOAD\_ERROR\_NONE)
     \{
        fprintf(stderr, \textcolor{stringliteral}{"could not load image '%s'. error string is \(\backslash\)"%s\(\backslash\)"\(\backslash\)n"},
                valid\_path, \hyperlink{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}{evas\_load\_error\_str}(err));
     \}
   \textcolor{keywordflow}{else}
     \{
        fprintf(stdout,
                \textcolor{stringliteral}{"loaded image '%s' with succes! error string is \(\backslash\)"%s\(\backslash\)"\(\backslash\)n"},
                valid\_path, \hyperlink{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}{evas\_load\_error\_str}(err));

        \hyperlink{group__Evas__Object__Group__Basic_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(d.img1, 3, 3);
        \hyperlink{group__Evas__Object__Image_gaf9a32e36b3446f597baf95aab37e33da}{evas\_object\_image\_fill\_set}(d.img1, 0, 0, WIDTH / 2, HEIGHT / 2);
        \hyperlink{group__Evas__Object__Group__Basic_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(d.img1, WIDTH / 2, HEIGHT / 2);
        \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.img1);

        \hyperlink{group__Evas__Object__Group__Basic_ga114336ce1de94dbb13843cca2516e34b}{evas\_object\_focus\_set}(d.bg, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
        \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(
          d.bg, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}, \_on\_keydown, NULL);
     \}

   \textcolor{comment}{/* this is a border around the image above, here just to emphasize}
\textcolor{comment}{    * its geometry */}
   d.border = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.evas);
   \hyperlink{group__Evas__Object__Image_ga805c898028d2626ab72f57c1dd3272a1}{evas\_object\_image\_file\_set}(d.border, border\_img\_path, NULL);
   \hyperlink{group__Evas__Object__Image_gace5efad74de9f87cd996b2a34b3ea591}{evas\_object\_image\_border\_set}(d.border, 3, 3, 3, 3);
   \hyperlink{group__Evas__Object__Image_ga1f134668dedc8ad855c3af28fd2df8f6}{evas\_object\_image\_border\_center\_fill\_set}(d.border, 
      \hyperlink{Evas__Common_8h_a4a05f0fd82f51c6b330e349457cdc7e2a2ad856ac6aab5e2659c3a584a37aec70}{EVAS\_BORDER\_FILL\_NONE});

   \hyperlink{group__Evas__Object__Group__Basic_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(d.border, 0, 0);
   \hyperlink{group__Evas__Object__Group__Basic_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(d.border, (WIDTH / 2) + 6, (HEIGHT / 2) + 6);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.border);

   \textcolor{comment}{/* image loading will fail for this one -- unless one cheats and}
\textcolor{comment}{    * puts a valid image on that path */}
   d.img2 = \hyperlink{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}{evas\_object\_image\_add}(d.evas);
   \hyperlink{group__Evas__Object__Image_ga805c898028d2626ab72f57c1dd3272a1}{evas\_object\_image\_file\_set}(d.img2, bogus\_path, NULL);
   err = \hyperlink{group__Evas__Object__Image_ga5a1eec674128f5d1365e80d628ad2bc3}{evas\_object\_image\_load\_error\_get}(d.img2);
   \textcolor{keywordflow}{if} (err != EVAS\_LOAD\_ERROR\_NONE)
     \{
        fprintf(stderr, \textcolor{stringliteral}{"could not load image '%s': error string is \(\backslash\)"%s\(\backslash\)"\(\backslash\)n"},
                bogus\_path, \hyperlink{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}{evas\_load\_error\_str}(err));
     \}
   \textcolor{keywordflow}{else}
     \{
        \hyperlink{group__Evas__Object__Group__Basic_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(d.img2, WIDTH / 2, HEIGHT / 2);
        \hyperlink{group__Evas__Object__Image_gaf9a32e36b3446f597baf95aab37e33da}{evas\_object\_image\_fill\_set}(d.img2, 0, 0, WIDTH / 2, HEIGHT / 2);
        \hyperlink{group__Evas__Object__Group__Basic_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(d.img2, WIDTH / 2, HEIGHT / 2);
        \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.img2);
     \}

   fprintf(stdout, commands);
   \hyperlink{group__Ecore__Main__Loop__Group_ga04daa7648a9d027bed25d27c150fdda7}{ecore\_main\_loop\_begin}();

\end{DoxyCodeInclude}


Here, being {\ttfamily valid\-\_\-path} the path to a valid image and {\ttfamily bogus\-\_\-path} a path to a file which does not exist, the two outputs of \hyperlink{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}{evas\-\_\-load\-\_\-error\-\_\-str()} would be (if no other errors occur)\-: {\ttfamily \char`\"{}\-No error on load\char`\"{}} and {\ttfamily \char`\"{}\-File (or file path) does
not exist\char`\"{}}, respectively. See the full \hyperlink{Example_Evas_Images}{example}. \hypertarget{group__Evas__Utils_ga143f983570c36917783a6b1a3b341bf5}{\index{General Utilities@{General Utilities}!evas\-\_\-color\-\_\-hsv\-\_\-to\-\_\-rgb@{evas\-\_\-color\-\_\-hsv\-\_\-to\-\_\-rgb}}
\index{evas\-\_\-color\-\_\-hsv\-\_\-to\-\_\-rgb@{evas\-\_\-color\-\_\-hsv\-\_\-to\-\_\-rgb}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-color\-\_\-hsv\-\_\-to\-\_\-rgb}]{\setlength{\rightskip}{0pt plus 5cm}void evas\-\_\-color\-\_\-hsv\-\_\-to\-\_\-rgb (
\begin{DoxyParamCaption}
\item[{float}]{h, }
\item[{float}]{s, }
\item[{float}]{v, }
\item[{int $\ast$}]{r, }
\item[{int $\ast$}]{g, }
\item[{int $\ast$}]{b}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_ga143f983570c36917783a6b1a3b341bf5}


Convert a given color from H\-S\-V to R\-G\-B format. 


\begin{DoxyParams}{Parameters}
{\em h} & The Hue component of the color. \\
\hline
{\em s} & The Saturation component of the color. \\
\hline
{\em v} & The Value component of the color. \\
\hline
{\em r} & The Red component of the color. \\
\hline
{\em g} & The Green component of the color. \\
\hline
{\em b} & The Blue component of the color.\\
\hline
\end{DoxyParams}
This function converts a given color in H\-S\-V color format to R\-G\-B color format. \hypertarget{group__Evas__Utils_gaa8711329d10e34fc8a3221598afe7a91}{\index{General Utilities@{General Utilities}!evas\-\_\-color\-\_\-rgb\-\_\-to\-\_\-hsv@{evas\-\_\-color\-\_\-rgb\-\_\-to\-\_\-hsv}}
\index{evas\-\_\-color\-\_\-rgb\-\_\-to\-\_\-hsv@{evas\-\_\-color\-\_\-rgb\-\_\-to\-\_\-hsv}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-color\-\_\-rgb\-\_\-to\-\_\-hsv}]{\setlength{\rightskip}{0pt plus 5cm}void evas\-\_\-color\-\_\-rgb\-\_\-to\-\_\-hsv (
\begin{DoxyParamCaption}
\item[{int}]{r, }
\item[{int}]{g, }
\item[{int}]{b, }
\item[{float $\ast$}]{h, }
\item[{float $\ast$}]{s, }
\item[{float $\ast$}]{v}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_gaa8711329d10e34fc8a3221598afe7a91}


Convert a given color from R\-G\-B to H\-S\-V format. 


\begin{DoxyParams}{Parameters}
{\em r} & The Red component of the color. \\
\hline
{\em g} & The Green component of the color. \\
\hline
{\em b} & The Blue component of the color. \\
\hline
{\em h} & The Hue component of the color. \\
\hline
{\em s} & The Saturation component of the color. \\
\hline
{\em v} & The Value component of the color.\\
\hline
\end{DoxyParams}
This function converts a given color in R\-G\-B color format to H\-S\-V color format. \hypertarget{group__Evas__Utils_gac02bf3973675ae7591b9f34deef1554f}{\index{General Utilities@{General Utilities}!evas\-\_\-color\-\_\-argb\-\_\-premul@{evas\-\_\-color\-\_\-argb\-\_\-premul}}
\index{evas\-\_\-color\-\_\-argb\-\_\-premul@{evas\-\_\-color\-\_\-argb\-\_\-premul}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-color\-\_\-argb\-\_\-premul}]{\setlength{\rightskip}{0pt plus 5cm}void evas\-\_\-color\-\_\-argb\-\_\-premul (
\begin{DoxyParamCaption}
\item[{int}]{a, }
\item[{int $\ast$}]{r, }
\item[{int $\ast$}]{g, }
\item[{int $\ast$}]{b}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_gac02bf3973675ae7591b9f34deef1554f}


Pre-\/multiplies a rgb triplet by an alpha factor. 


\begin{DoxyParams}{Parameters}
{\em a} & The alpha factor. \\
\hline
{\em r} & The Red component of the color. \\
\hline
{\em g} & The Green component of the color. \\
\hline
{\em b} & The Blue component of the color.\\
\hline
\end{DoxyParams}
This function pre-\/multiplies a given rgb triplet by an alpha factor. Alpha factor is used to define transparency. \hypertarget{group__Evas__Utils_ga862abed1097a429dd439fbe08813cd9d}{\index{General Utilities@{General Utilities}!evas\-\_\-color\-\_\-argb\-\_\-unpremul@{evas\-\_\-color\-\_\-argb\-\_\-unpremul}}
\index{evas\-\_\-color\-\_\-argb\-\_\-unpremul@{evas\-\_\-color\-\_\-argb\-\_\-unpremul}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-color\-\_\-argb\-\_\-unpremul}]{\setlength{\rightskip}{0pt plus 5cm}void evas\-\_\-color\-\_\-argb\-\_\-unpremul (
\begin{DoxyParamCaption}
\item[{int}]{a, }
\item[{int $\ast$}]{r, }
\item[{int $\ast$}]{g, }
\item[{int $\ast$}]{b}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_ga862abed1097a429dd439fbe08813cd9d}


Undo pre-\/multiplication of a rgb triplet by an alpha factor. 


\begin{DoxyParams}{Parameters}
{\em a} & The alpha factor. \\
\hline
{\em r} & The Red component of the color. \\
\hline
{\em g} & The Green component of the color. \\
\hline
{\em b} & The Blue component of the color.\\
\hline
\end{DoxyParams}
This function undoes pre-\/multiplication a given rbg triplet by an alpha factor. Alpha factor is used to define transparency.

\begin{DoxySeeAlso}{See Also}
\hyperlink{group__Evas__Utils_gac02bf3973675ae7591b9f34deef1554f}{evas\-\_\-color\-\_\-argb\-\_\-premul()}. 
\end{DoxySeeAlso}
\hypertarget{group__Evas__Utils_ga6728112a26090165c5e4a1a6bf71ffb1}{\index{General Utilities@{General Utilities}!evas\-\_\-data\-\_\-argb\-\_\-premul@{evas\-\_\-data\-\_\-argb\-\_\-premul}}
\index{evas\-\_\-data\-\_\-argb\-\_\-premul@{evas\-\_\-data\-\_\-argb\-\_\-premul}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-data\-\_\-argb\-\_\-premul}]{\setlength{\rightskip}{0pt plus 5cm}void evas\-\_\-data\-\_\-argb\-\_\-premul (
\begin{DoxyParamCaption}
\item[{unsigned int $\ast$}]{data, }
\item[{unsigned int}]{len}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_ga6728112a26090165c5e4a1a6bf71ffb1}


Pre-\/multiplies data by an alpha factor. 


\begin{DoxyParams}{Parameters}
{\em data} & The data value. \\
\hline
{\em len} & The length value.\\
\hline
\end{DoxyParams}
This function pre-\/multiplies a given data by an alpha factor. Alpha factor is used to define transparency. \hypertarget{group__Evas__Utils_gafdab034f277f25c3cd0195f4e7fbb38d}{\index{General Utilities@{General Utilities}!evas\-\_\-data\-\_\-argb\-\_\-unpremul@{evas\-\_\-data\-\_\-argb\-\_\-unpremul}}
\index{evas\-\_\-data\-\_\-argb\-\_\-unpremul@{evas\-\_\-data\-\_\-argb\-\_\-unpremul}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-data\-\_\-argb\-\_\-unpremul}]{\setlength{\rightskip}{0pt plus 5cm}void evas\-\_\-data\-\_\-argb\-\_\-unpremul (
\begin{DoxyParamCaption}
\item[{unsigned int $\ast$}]{data, }
\item[{unsigned int}]{len}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_gafdab034f277f25c3cd0195f4e7fbb38d}


Undo pre-\/multiplication data by an alpha factor. 


\begin{DoxyParams}{Parameters}
{\em data} & The data value. \\
\hline
{\em len} & The length value.\\
\hline
\end{DoxyParams}
This function undoes pre-\/multiplication of a given data by an alpha factor. Alpha factor is used to define transparency. \hypertarget{group__Evas__Utils_ga044cd250a33c2d994b2c5d3d31e3f413}{\index{General Utilities@{General Utilities}!evas\-\_\-string\-\_\-char\-\_\-next\-\_\-get@{evas\-\_\-string\-\_\-char\-\_\-next\-\_\-get}}
\index{evas\-\_\-string\-\_\-char\-\_\-next\-\_\-get@{evas\-\_\-string\-\_\-char\-\_\-next\-\_\-get}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-string\-\_\-char\-\_\-next\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}int evas\-\_\-string\-\_\-char\-\_\-next\-\_\-get (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{int}]{pos, }
\item[{int $\ast$}]{decoded}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_ga044cd250a33c2d994b2c5d3d31e3f413}


Gets the next character in the string. 

Given the U\-T\-F-\/8 string in {\ttfamily str}, and starting byte position in {\ttfamily pos}, this function will place in {\ttfamily decoded} the decoded code point at {\ttfamily pos} and return the byte index for the next character in the string.

The only boundary check done is that {\ttfamily pos} must be $>$= 0. Other than that, no checks are performed, so passing an index value that's not within the length of the string will result in undefined behavior.


\begin{DoxyParams}{Parameters}
{\em str} & The U\-T\-F-\/8 string \\
\hline
{\em pos} & The byte index where to start \\
\hline
{\em decoded} & Address where to store the decoded code point. Optional.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The byte index of the next character 
\end{DoxyReturn}


References eina\-\_\-unicode\-\_\-utf8\-\_\-next\-\_\-get().

\hypertarget{group__Evas__Utils_gab7c9b92ab4ccb14a3391f1fa884bae24}{\index{General Utilities@{General Utilities}!evas\-\_\-string\-\_\-char\-\_\-prev\-\_\-get@{evas\-\_\-string\-\_\-char\-\_\-prev\-\_\-get}}
\index{evas\-\_\-string\-\_\-char\-\_\-prev\-\_\-get@{evas\-\_\-string\-\_\-char\-\_\-prev\-\_\-get}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-string\-\_\-char\-\_\-prev\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}int evas\-\_\-string\-\_\-char\-\_\-prev\-\_\-get (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{int}]{pos, }
\item[{int $\ast$}]{decoded}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_gab7c9b92ab4ccb14a3391f1fa884bae24}


Gets the previous character in the string. 

Given the U\-T\-F-\/8 string in {\ttfamily str}, and starting byte position in {\ttfamily pos}, this function will place in {\ttfamily decoded} the decoded code point at {\ttfamily pos} and return the byte index for the previous character in the string.

The only boundary check done is that {\ttfamily pos} must be $>$= 1. Other than that, no checks are performed, so passing an index value that's not within the length of the string will result in undefined behavior.


\begin{DoxyParams}{Parameters}
{\em str} & The U\-T\-F-\/8 string \\
\hline
{\em pos} & The byte index where to start \\
\hline
{\em decoded} & Address where to store the decoded code point. Optional.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The byte index of the previous character 
\end{DoxyReturn}


References eina\-\_\-unicode\-\_\-utf8\-\_\-get\-\_\-prev().

\hypertarget{group__Evas__Utils_gadfcfcae8546f2d7f6c14c5e1b17b8446}{\index{General Utilities@{General Utilities}!evas\-\_\-string\-\_\-char\-\_\-len\-\_\-get@{evas\-\_\-string\-\_\-char\-\_\-len\-\_\-get}}
\index{evas\-\_\-string\-\_\-char\-\_\-len\-\_\-get@{evas\-\_\-string\-\_\-char\-\_\-len\-\_\-get}!General Utilities@{General Utilities}}
\subsubsection[{evas\-\_\-string\-\_\-char\-\_\-len\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}int evas\-\_\-string\-\_\-char\-\_\-len\-\_\-get (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Evas__Utils_gadfcfcae8546f2d7f6c14c5e1b17b8446}


Get the length in characters of the string. 


\begin{DoxyParams}{Parameters}
{\em str} & The string to get the length of. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The length in characters (not bytes) 
\end{DoxyReturn}


References eina\-\_\-unicode\-\_\-utf8\-\_\-get\-\_\-len().

