\hypertarget{group__Eina__Slice__Group}{}\doxysection{Memory Slices}
\label{group__Eina__Slice__Group}\index{Memory Slices@{Memory Slices}}


These functions provide memory slices in read-\/only and read-\/write forms.  


\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__Eina__Slice}{\+\_\+\+Eina\+\_\+\+Slice}}
\begin{DoxyCompactList}\small\item\em Defines a read-\/only memory region. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{struct__Eina__Rw__Slice}{\+\_\+\+Eina\+\_\+\+Rw\+\_\+\+Slice}}
\begin{DoxyCompactList}\small\item\em Defines a read-\/and-\/write able memory region. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}{EINA\+\_\+\+SLICE\+\_\+\+ARRAY}}(buf)~\{.len = ((sizeof(buf) / sizeof((buf)\mbox{[}0\mbox{]})) $\ast$ sizeof((buf)\mbox{[}0\mbox{]})), .mem = (buf)\}
\begin{DoxyCompactList}\small\item\em Initializer for arrays of any kind. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga9f0e20889cd4f15fe8f8bf0d8b83f03d}{EINA\+\_\+\+RW\+\_\+\+SLICE\+\_\+\+DECLARE}}(name,  length)
\begin{DoxyCompactList}\small\item\em Declare a local (stack) array for storage at given {\itshape length} and initialize an Eina\+\_\+\+Rw\+\_\+\+Slice called {\itshape name}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+LITERAL}}(buf)~\{.len = (sizeof(\char`\"{}\char`\"{} buf) -\/ 1), .mem = (buf)\}
\begin{DoxyCompactList}\small\item\em Initializer for string literals (those declared as double-\/quoted). \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga092e2418bee056b959e6d5402ecf224c}{EINA\+\_\+\+SLICE\+\_\+\+STR}}(str)~\{.len = strlen((str)), .mem = (str)\}
\begin{DoxyCompactList}\small\item\em Initializer for strings (uses strlen()). \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga5a3195649b6959f64f27eae978862162}{EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FULL}}(str)~\{.len = strlen((str)) + 1, .mem = (str)\}
\begin{DoxyCompactList}\small\item\em Same as EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FULL, but it also contains the \textbackslash{}0 element of the string. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_gafcfddc473933c1c23485a16ae7ec79d8}{EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FMT}}~\char`\"{}\%.$\ast$s\char`\"{}
\begin{DoxyCompactList}\small\item\em To be used in printf()-\/like statements, prints the slice as a string, its {\ttfamily len} is to be used, then it doesn\textquotesingle{}t need the null terminator. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}{EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+PRINT}}(s)~(int)(s).len, (const char $\ast$)(s).mem
\begin{DoxyCompactList}\small\item\em To be used in printf()-\/like statements when EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FMT was used, it will print the slice as a string up to {\ttfamily len}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga58e945b97386a5013795ed1354c23400}{EINA\+\_\+\+SLICE\+\_\+\+FMT}}~\char`\"{}\%p+\%zu\char`\"{}
\begin{DoxyCompactList}\small\item\em To be used in printf()-\/like statements, prints the slice as {\ttfamily 0x1234+12} ({\ttfamily mem} + {\ttfamily len}). \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga416d9dc60fa9bd102f59ca578883a5b5}{EINA\+\_\+\+SLICE\+\_\+\+PRINT}}(s)~(s).mem, (s).len
\begin{DoxyCompactList}\small\item\em To be used in printf()-\/like statements when EINA\+\_\+\+SLICE\+\_\+\+FMT was used, it will print the slice {\ttfamily mem} and {\ttfamily len}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga99945401c9af5e354a71d319cbeb6cfd}{EINA\+\_\+\+SLICE\+\_\+\+FOREACH}}(s,  itr)
\begin{DoxyCompactList}\small\item\em Iterate over the slice memory, using {\ttfamily itr}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{struct__Eina__Slice}{\+\_\+\+Eina\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}
\begin{DoxyCompactList}\small\item\em Defines a read-\/only memory region. \end{DoxyCompactList}\item 
typedef struct \mbox{\hyperlink{struct__Eina__Rw__Slice}{\+\_\+\+Eina\+\_\+\+Rw\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}
\begin{DoxyCompactList}\small\item\em Defines a read-\/and-\/write able memory region. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_ga5d7acf32e2da96c11d2cd14bf98ac18e}{eina\+\_\+rw\+\_\+slice\+\_\+slice\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice)
\begin{DoxyCompactList}\small\item\em Convert the Read-\/write slice to read-\/only. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_ga81f89e39b4402c7ad5fa5e0c2641818f}{eina\+\_\+slice\+\_\+dup}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice)
\begin{DoxyCompactList}\small\item\em Creates a duplicate of slice\textquotesingle{}s memory. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_gab38caf5852df81ab9dff5f08bba49df6}{eina\+\_\+rw\+\_\+slice\+\_\+dup}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice)
\begin{DoxyCompactList}\small\item\em Creates a duplicate of slice\textquotesingle{}s memory. \end{DoxyCompactList}\item 
static int \mbox{\hyperlink{group__Eina__Slice__Group_ga95f9f0b7fcb0a5cb54ef5fae6d954bb4}{eina\+\_\+slice\+\_\+compare}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} a, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} b)
\begin{DoxyCompactList}\small\item\em Compare two slices, similar to memcmp() \end{DoxyCompactList}\item 
static int \mbox{\hyperlink{group__Eina__Slice__Group_ga99693cc5308b8993bb723e51e5a2c431}{eina\+\_\+rw\+\_\+slice\+\_\+compare}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} a, const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} b)
\begin{DoxyCompactList}\small\item\em Compare two slices, similar to memcmp() \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_gab962f48bfa7b6571c39bca057e442fd3}{eina\+\_\+rw\+\_\+slice\+\_\+copy}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} dest, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} src)
\begin{DoxyCompactList}\small\item\em Copy a read-\/only slice to a read-\/write one, similar to memcpy(). \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_gaef4d40c4d632a2619e5a6d3c950d686b}{eina\+\_\+slice\+\_\+seek}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice, ssize\+\_\+t offset, int whence)
\begin{DoxyCompactList}\small\item\em Seek within a slice, similar to fseek(). \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} \mbox{\hyperlink{group__Eina__Slice__Group_ga958aab5fedda9b0b3ecc2423a2d6df83}{eina\+\_\+rw\+\_\+slice\+\_\+seek}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice, ssize\+\_\+t offset, int whence)
\begin{DoxyCompactList}\small\item\em Seek within a read-\/write slice, similar to fseek(). \end{DoxyCompactList}\item 
static const void $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_ga529b6d1a3961bc0a6bc2b13aabde2709}{eina\+\_\+slice\+\_\+strchr}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice, int c)
\begin{DoxyCompactList}\small\item\em Find a character inside the slice, similar to memchr(). \end{DoxyCompactList}\item 
static const void $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_gab7ad1806302980e127e1e01f7bcb68a4}{eina\+\_\+slice\+\_\+find}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} needle)
\begin{DoxyCompactList}\small\item\em Find a needle inside the slice, similar to memmem(). \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Slice__Group_gad0bd7f5338abb955a66b1b1764432131}{eina\+\_\+slice\+\_\+startswith}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} prefix)
\begin{DoxyCompactList}\small\item\em Checks if the slice starts with a prefix. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Slice__Group_gaae695a0c6a9f1521885638a5dff160a1}{eina\+\_\+slice\+\_\+endswith}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} suffix)
\begin{DoxyCompactList}\small\item\em Checks if the slice ends with a suffix. \end{DoxyCompactList}\item 
static void $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_ga896b2b6363b71e53b40d8f05d5b27768}{eina\+\_\+rw\+\_\+slice\+\_\+strchr}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice, int c)
\begin{DoxyCompactList}\small\item\em Find a character inside the slice, similar to memchr(). \end{DoxyCompactList}\item 
static void $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_gac6d77db792aa53626572b90c6e7c966f}{eina\+\_\+rw\+\_\+slice\+\_\+find}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} needle)
\begin{DoxyCompactList}\small\item\em Find a needle inside the slice, similar to memmem(). \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Slice__Group_ga7fccc37aae0a3eba9c8f36a3b7721f1b}{eina\+\_\+rw\+\_\+slice\+\_\+startswith}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} slice, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} prefix)
\begin{DoxyCompactList}\small\item\em Checks if the slice starts with a prefix. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Slice__Group_ga93b54c8d98bc7e09c7bc6f74e74e7039}{eina\+\_\+rw\+\_\+slice\+\_\+endswith}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} slice, const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} suffix)
\begin{DoxyCompactList}\small\item\em Checks if the slice ends with a suffix. \end{DoxyCompactList}\item 
static const void $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_ga199d8aeb7a6cfe1828725d5f805ea3ac}{eina\+\_\+slice\+\_\+end\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice)
\begin{DoxyCompactList}\small\item\em The memory position where the slice ends. \end{DoxyCompactList}\item 
static void $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_gaeba4a347e277aa3c45272d788cfdb165}{eina\+\_\+rw\+\_\+slice\+\_\+end\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice)
\begin{DoxyCompactList}\small\item\em The memory position where the slice ends. \end{DoxyCompactList}\item 
static char $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_ga2a24c0cf8ee1a7276297ef534c2002ed}{eina\+\_\+slice\+\_\+strdup}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice)
\begin{DoxyCompactList}\small\item\em A null-\/terminated string for this slice. \end{DoxyCompactList}\item 
static char $\ast$ \mbox{\hyperlink{group__Eina__Slice__Group_ga31f77f0db0f630e3bbabf44a23a13df1}{eina\+\_\+rw\+\_\+slice\+\_\+strdup}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice)
\begin{DoxyCompactList}\small\item\em A null-\/terminated string for this slice. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
These functions provide memory slices in read-\/only and read-\/write forms. 

Memory slices define a contiguous linear memory starting at a given pointer ({\ttfamily mem}) and spanning for a given length ({\ttfamily len}).

They may be read-\/only (Eina\+\_\+\+Slice) or read-\/write (Eina\+\_\+\+Rw\+\_\+\+Slice).

\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}\label{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_ARRAY@{EINA\_SLICE\_ARRAY}}
\index{EINA\_SLICE\_ARRAY@{EINA\_SLICE\_ARRAY}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_ARRAY}{EINA\_SLICE\_ARRAY}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+ARRAY(\begin{DoxyParamCaption}\item[{}]{buf }\end{DoxyParamCaption})~\{.len = ((sizeof(buf) / sizeof((buf)\mbox{[}0\mbox{]})) $\ast$ sizeof((buf)\mbox{[}0\mbox{]})), .mem = (buf)\}}



Initializer for arrays of any kind. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em buf} & The array to create the slice from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The initialized slice object.
\end{DoxyReturn}
It is often useful for globals.

\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ uint8\_t\ buf[1024];}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ rw\_slice\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}{EINA\_SLICE\_ARRAY}}(buf);}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+LITERAL()}} for specific version that checks for string literals.
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga9f0e20889cd4f15fe8f8bf0d8b83f03d}\label{group__Eina__Slice__Group_ga9f0e20889cd4f15fe8f8bf0d8b83f03d}} 
\index{Memory Slices@{Memory Slices}!EINA\_RW\_SLICE\_DECLARE@{EINA\_RW\_SLICE\_DECLARE}}
\index{EINA\_RW\_SLICE\_DECLARE@{EINA\_RW\_SLICE\_DECLARE}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_RW\_SLICE\_DECLARE}{EINA\_RW\_SLICE\_DECLARE}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+RW\+\_\+\+SLICE\+\_\+\+DECLARE(\begin{DoxyParamCaption}\item[{}]{name,  }\item[{}]{length }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ uint8\_t\ \_eina\_slice\_storage\_\ \#\#\ name\ [(length)]\ =\ \{\ 0\ \};\ \(\backslash\)}
\DoxyCodeLine{\ \ \mbox{\hyperlink{struct__Eina__Rw__Slice}{Eina\_Rw\_Slice}}\ name\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}{EINA\_SLICE\_ARRAY}}(\_eina\_slice\_storage\_\ \#\#\ name)}

\end{DoxyCode}


Declare a local (stack) array for storage at given {\itshape length} and initialize an Eina\+\_\+\+Rw\+\_\+\+Slice called {\itshape name}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em name} & the name of the variable to be the Eina\+\_\+\+Rw\+\_\+\+Slice. \\
\hline
\mbox{\texttt{ in}}  & {\em length} & the size in bytes of the storage.\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}\label{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_STR\_LITERAL@{EINA\_SLICE\_STR\_LITERAL}}
\index{EINA\_SLICE\_STR\_LITERAL@{EINA\_SLICE\_STR\_LITERAL}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_STR\_LITERAL}{EINA\_SLICE\_STR\_LITERAL}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+LITERAL(\begin{DoxyParamCaption}\item[{}]{buf }\end{DoxyParamCaption})~\{.len = (sizeof(\char`\"{}\char`\"{} buf) -\/ 1), .mem = (buf)\}}



Initializer for string literals (those declared as double-\/quoted). 

The size will {\bfseries{NOT}} include the trailing null-\/terminator.

It is often useful for globals.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em buf} & The array to create the slice from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The initialized slice object.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ ro\_slice\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"{}hello\ world"{}});}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_ga092e2418bee056b959e6d5402ecf224c}{EINA\+\_\+\+SLICE\+\_\+\+STR()}} for more generic version. 

\mbox{\hyperlink{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}{EINA\+\_\+\+SLICE\+\_\+\+ARRAY()}} for version that uses a general array.
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga092e2418bee056b959e6d5402ecf224c}\label{group__Eina__Slice__Group_ga092e2418bee056b959e6d5402ecf224c}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_STR@{EINA\_SLICE\_STR}}
\index{EINA\_SLICE\_STR@{EINA\_SLICE\_STR}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_STR}{EINA\_SLICE\_STR}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+STR(\begin{DoxyParamCaption}\item[{}]{str }\end{DoxyParamCaption})~\{.len = strlen((str)), .mem = (str)\}}



Initializer for strings (uses strlen()). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & The string to create the slice from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The initialized slice object.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ ro\_slice\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga092e2418bee056b959e6d5402ecf224c}{EINA\_SLICE\_STR}}(\textcolor{stringliteral}{"{}hello\ world"{}});}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_ga092e2418bee056b959e6d5402ecf224c}{EINA\+\_\+\+SLICE\+\_\+\+STR()}} for specific version using literals.
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga5a3195649b6959f64f27eae978862162}\label{group__Eina__Slice__Group_ga5a3195649b6959f64f27eae978862162}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_STR\_FULL@{EINA\_SLICE\_STR\_FULL}}
\index{EINA\_SLICE\_STR\_FULL@{EINA\_SLICE\_STR\_FULL}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_STR\_FULL}{EINA\_SLICE\_STR\_FULL}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FULL(\begin{DoxyParamCaption}\item[{}]{str }\end{DoxyParamCaption})~\{.len = strlen((str)) + 1, .mem = (str)\}}



Same as EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FULL, but it also contains the \textbackslash{}0 element of the string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em str} & The string to create the slice from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The initialized slice object.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ ro\_slice\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga5a3195649b6959f64f27eae978862162}{EINA\_SLICE\_STR\_FULL}}(\textcolor{stringliteral}{"{}hello\ world"{}});}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_ga5a3195649b6959f64f27eae978862162}{EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FULL()}} for specific version using literals.
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+24 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gafcfddc473933c1c23485a16ae7ec79d8}\label{group__Eina__Slice__Group_gafcfddc473933c1c23485a16ae7ec79d8}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_STR\_FMT@{EINA\_SLICE\_STR\_FMT}}
\index{EINA\_SLICE\_STR\_FMT@{EINA\_SLICE\_STR\_FMT}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_STR\_FMT}{EINA\_SLICE\_STR\_FMT}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FMT~\char`\"{}\%.$\ast$s\char`\"{}}



To be used in printf()-\/like statements, prints the slice as a string, its {\ttfamily len} is to be used, then it doesn\textquotesingle{}t need the null terminator. 

Use with \mbox{\hyperlink{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}{EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+PRINT()}}

\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ s\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"{}hello"{}});}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}s="{}}\ \mbox{\hyperlink{group__Eina__Slice__Group_gafcfddc473933c1c23485a16ae7ec79d8}{EINA\_SLICE\_STR\_FMT}}\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}},\ \mbox{\hyperlink{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}{EINA\_SLICE\_STR\_PRINT}}(s));}

\end{DoxyCode}


\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}\label{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_STR\_PRINT@{EINA\_SLICE\_STR\_PRINT}}
\index{EINA\_SLICE\_STR\_PRINT@{EINA\_SLICE\_STR\_PRINT}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_STR\_PRINT}{EINA\_SLICE\_STR\_PRINT}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+PRINT(\begin{DoxyParamCaption}\item[{}]{s }\end{DoxyParamCaption})~(int)(s).len, (const char $\ast$)(s).mem}



To be used in printf()-\/like statements when EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FMT was used, it will print the slice as a string up to {\ttfamily len}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em s} & The slice. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The arguments for an EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FMT formatted printf.
\end{DoxyReturn}
Use with EINA\+\_\+\+SLICE\+\_\+\+STR\+\_\+\+FMT.

\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ s\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"{}hello"{}});}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}s="{}}\ \mbox{\hyperlink{group__Eina__Slice__Group_gafcfddc473933c1c23485a16ae7ec79d8}{EINA\_SLICE\_STR\_FMT}}\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}},\ \mbox{\hyperlink{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}{EINA\_SLICE\_STR\_PRINT}}(s));}

\end{DoxyCode}


\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga58e945b97386a5013795ed1354c23400}\label{group__Eina__Slice__Group_ga58e945b97386a5013795ed1354c23400}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_FMT@{EINA\_SLICE\_FMT}}
\index{EINA\_SLICE\_FMT@{EINA\_SLICE\_FMT}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_FMT}{EINA\_SLICE\_FMT}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+FMT~\char`\"{}\%p+\%zu\char`\"{}}



To be used in printf()-\/like statements, prints the slice as {\ttfamily 0x1234+12} ({\ttfamily mem} + {\ttfamily len}). 

Use with \mbox{\hyperlink{group__Eina__Slice__Group_ga416d9dc60fa9bd102f59ca578883a5b5}{EINA\+\_\+\+SLICE\+\_\+\+PRINT()}}

\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ s\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"{}hello"{}});}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}s="{}}\ \mbox{\hyperlink{group__Eina__Slice__Group_ga58e945b97386a5013795ed1354c23400}{EINA\_SLICE\_FMT}}\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}},\ \mbox{\hyperlink{group__Eina__Slice__Group_ga416d9dc60fa9bd102f59ca578883a5b5}{EINA\_SLICE\_PRINT}}(s));}

\end{DoxyCode}


\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga416d9dc60fa9bd102f59ca578883a5b5}\label{group__Eina__Slice__Group_ga416d9dc60fa9bd102f59ca578883a5b5}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_PRINT@{EINA\_SLICE\_PRINT}}
\index{EINA\_SLICE\_PRINT@{EINA\_SLICE\_PRINT}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_PRINT}{EINA\_SLICE\_PRINT}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+PRINT(\begin{DoxyParamCaption}\item[{}]{s }\end{DoxyParamCaption})~(s).mem, (s).len}



To be used in printf()-\/like statements when EINA\+\_\+\+SLICE\+\_\+\+FMT was used, it will print the slice {\ttfamily mem} and {\ttfamily len}. 

Use with EINA\+\_\+\+SLICE\+\_\+\+FMT.

\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em s} & The slice. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The arguments for an EINA\+\_\+\+SLICE\+\_\+\+FMT formatted printf.
\end{DoxyReturn}

\begin{DoxyCode}{0}
\DoxyCodeLine{\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}}\ s\ =\ \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"{}hello"{}});}
\DoxyCodeLine{printf(\textcolor{stringliteral}{"{}s="{}}\ \mbox{\hyperlink{group__Eina__Slice__Group_ga58e945b97386a5013795ed1354c23400}{EINA\_SLICE\_FMT}}\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}},\ \mbox{\hyperlink{group__Eina__Slice__Group_ga416d9dc60fa9bd102f59ca578883a5b5}{EINA\_SLICE\_PRINT}}(s));}

\end{DoxyCode}


\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga99945401c9af5e354a71d319cbeb6cfd}\label{group__Eina__Slice__Group_ga99945401c9af5e354a71d319cbeb6cfd}} 
\index{Memory Slices@{Memory Slices}!EINA\_SLICE\_FOREACH@{EINA\_SLICE\_FOREACH}}
\index{EINA\_SLICE\_FOREACH@{EINA\_SLICE\_FOREACH}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{EINA\_SLICE\_FOREACH}{EINA\_SLICE\_FOREACH}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+SLICE\+\_\+\+FOREACH(\begin{DoxyParamCaption}\item[{}]{s,  }\item[{}]{itr }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{\ \ \textcolor{keywordflow}{for}\ ((itr)\ =\ (s).mem;\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ (\textcolor{keywordtype}{void}\ *)(itr)\ <\ (\textcolor{keywordtype}{void}\ *)((s).bytes\ +\ (s).len);\ \(\backslash\)}
\DoxyCodeLine{\ \ \ \ \ \ \ (itr)++)}

\end{DoxyCode}


Iterate over the slice memory, using {\ttfamily itr}. 

Each increment will be using the size of {\ttfamily itr} pointer (int32\+\_\+t$\ast$ will do in increments of 4 bytes).

\begin{DoxyNote}{Note}
This macro is usable with both Eina\+\_\+\+Slice or Eina\+\_\+\+Rw\+\_\+\+Slice.

Be aware of memory alignment! Accessing unaligned memory may not be supported in some architectures.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em s} & The slice. \\
\hline
\mbox{\texttt{ in,out}}  & {\em itr} & the iterator to hold each byte. Use a proper type, not \char`\"{}void$\ast$\char`\"{} or \char`\"{}const void$\ast$\char`\"{} as it doesn\textquotesingle{}t have an intrinsic size.\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}\label{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}} 
\index{Memory Slices@{Memory Slices}!Eina\_Slice@{Eina\_Slice}}
\index{Eina\_Slice@{Eina\_Slice}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{Eina\_Slice}{Eina\_Slice}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}



Defines a read-\/only memory region. 

The slice is a memory starting at {\ttfamily mem} and accessible up to {\ttfamily len} bytes.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} for read-\/write memory regions.
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}\label{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}} 
\index{Memory Slices@{Memory Slices}!Eina\_Rw\_Slice@{Eina\_Rw\_Slice}}
\index{Eina\_Rw\_Slice@{Eina\_Rw\_Slice}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{Eina\_Rw\_Slice}{Eina\_Rw\_Slice}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}



Defines a read-\/and-\/write able memory region. 

The slice is a memory starting at {\ttfamily mem} and accessible up to {\ttfamily len} bytes.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} for read-\/only memory regions.
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga5d7acf32e2da96c11d2cd14bf98ac18e}\label{group__Eina__Slice__Group_ga5d7acf32e2da96c11d2cd14bf98ac18e}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_slice\_get@{eina\_rw\_slice\_slice\_get}}
\index{eina\_rw\_slice\_slice\_get@{eina\_rw\_slice\_slice\_get}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_slice\_get()}{eina\_rw\_slice\_slice\_get()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} eina\+\_\+rw\+\_\+slice\+\_\+slice\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{rw\+\_\+slice }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Convert the Read-\/write slice to read-\/only. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rw\+\_\+slice} & the read-\/write slice to convert. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the red-\/only slice matching the slice. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga81f89e39b4402c7ad5fa5e0c2641818f}\label{group__Eina__Slice__Group_ga81f89e39b4402c7ad5fa5e0c2641818f}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_dup@{eina\_slice\_dup}}
\index{eina\_slice\_dup@{eina\_slice\_dup}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_dup()}{eina\_slice\_dup()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} eina\+\_\+slice\+\_\+dup (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Creates a duplicate of slice\textquotesingle{}s memory. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the input to duplicate \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a new read-\/write slice with new {\ttfamily mem} that matches {\itshape slice} contents. The new {\ttfamily mem} is allocated with malloc() and must be released with free().
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_gab962f48bfa7b6571c39bca057e442fd3}{eina\+\_\+rw\+\_\+slice\+\_\+copy()}} 

\mbox{\hyperlink{group__Eina__Slice__Group_gab38caf5852df81ab9dff5f08bba49df6}{eina\+\_\+rw\+\_\+slice\+\_\+dup()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gab38caf5852df81ab9dff5f08bba49df6}\label{group__Eina__Slice__Group_gab38caf5852df81ab9dff5f08bba49df6}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_dup@{eina\_rw\_slice\_dup}}
\index{eina\_rw\_slice\_dup@{eina\_rw\_slice\_dup}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_dup()}{eina\_rw\_slice\_dup()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} eina\+\_\+rw\+\_\+slice\+\_\+dup (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{rw\+\_\+slice }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Creates a duplicate of slice\textquotesingle{}s memory. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rw\+\_\+slice} & the input to duplicate \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a new read-\/write slice with new {\ttfamily mem} that matches {\itshape slice} contents. The new {\ttfamily mem} is allocated with malloc() and must be released with free().
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_gab962f48bfa7b6571c39bca057e442fd3}{eina\+\_\+rw\+\_\+slice\+\_\+copy()}} 

\mbox{\hyperlink{group__Eina__Slice__Group_ga81f89e39b4402c7ad5fa5e0c2641818f}{eina\+\_\+slice\+\_\+dup()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga95f9f0b7fcb0a5cb54ef5fae6d954bb4}\label{group__Eina__Slice__Group_ga95f9f0b7fcb0a5cb54ef5fae6d954bb4}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_compare@{eina\_slice\_compare}}
\index{eina\_slice\_compare@{eina\_slice\_compare}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_compare()}{eina\_slice\_compare()}}
{\footnotesize\ttfamily static int eina\+\_\+slice\+\_\+compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{a,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{b }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Compare two slices, similar to memcmp() 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & the first slice to compare. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & the second slice to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if equal, \texorpdfstring{$<$}{<} 0 if a \texorpdfstring{$<$}{<} b, \texorpdfstring{$>$}{>} 0 if a \texorpdfstring{$>$}{>} b
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga99693cc5308b8993bb723e51e5a2c431}\label{group__Eina__Slice__Group_ga99693cc5308b8993bb723e51e5a2c431}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_compare@{eina\_rw\_slice\_compare}}
\index{eina\_rw\_slice\_compare@{eina\_rw\_slice\_compare}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_compare()}{eina\_rw\_slice\_compare()}}
{\footnotesize\ttfamily static int eina\+\_\+rw\+\_\+slice\+\_\+compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{a,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{b }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Compare two slices, similar to memcmp() 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a} & the first slice to compare. \\
\hline
\mbox{\texttt{ in}}  & {\em b} & the second slice to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if equal, \texorpdfstring{$<$}{<} 0 if a \texorpdfstring{$<$}{<} b, \texorpdfstring{$>$}{>} 0 if a \texorpdfstring{$>$}{>} b
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gab962f48bfa7b6571c39bca057e442fd3}\label{group__Eina__Slice__Group_gab962f48bfa7b6571c39bca057e442fd3}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_copy@{eina\_rw\_slice\_copy}}
\index{eina\_rw\_slice\_copy@{eina\_rw\_slice\_copy}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_copy()}{eina\_rw\_slice\_copy()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} eina\+\_\+rw\+\_\+slice\+\_\+copy (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{dest,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{src }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Copy a read-\/only slice to a read-\/write one, similar to memcpy(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em dest} & where to write the memory. \\
\hline
\mbox{\texttt{ in}}  & {\em src} & where to load memory.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a new slice with the resulting write. Note that the length ({\ttfamily len}) will be the smallest of {\itshape dest} and {\itshape src}.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Slice__Group_gab38caf5852df81ab9dff5f08bba49df6}{eina\+\_\+rw\+\_\+slice\+\_\+dup()}} 

\mbox{\hyperlink{group__Eina__Slice__Group_ga81f89e39b4402c7ad5fa5e0c2641818f}{eina\+\_\+slice\+\_\+dup()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gaef4d40c4d632a2619e5a6d3c950d686b}\label{group__Eina__Slice__Group_gaef4d40c4d632a2619e5a6d3c950d686b}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_seek@{eina\_slice\_seek}}
\index{eina\_slice\_seek@{eina\_slice\_seek}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_seek()}{eina\_slice\_seek()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} eina\+\_\+slice\+\_\+seek (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice,  }\item[{ssize\+\_\+t}]{offset,  }\item[{int}]{whence }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Seek within a slice, similar to fseek(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the containing slice to seek inside. \\
\hline
\mbox{\texttt{ in}}  & {\em offset} & how to get to the new position. \\
\hline
\mbox{\texttt{ in}}  & {\em whence} & SEEK\+\_\+\+SET, SEEK\+\_\+\+END as fseek(). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a new slice contained inside, it will start at the given offset and have a length that goes until the end of the {\itshape slice}. If an invalid {\itshape whence}, a zero-\/sized slice starting at {\itshape slice} mem will be returned. The slice is guaranteed to be contained within {\itshape slice}, even if offset causes it to go out of bounds, then it will be clamped to 0 and slice.\+len.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga958aab5fedda9b0b3ecc2423a2d6df83}\label{group__Eina__Slice__Group_ga958aab5fedda9b0b3ecc2423a2d6df83}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_seek@{eina\_rw\_slice\_seek}}
\index{eina\_rw\_slice\_seek@{eina\_rw\_slice\_seek}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_seek()}{eina\_rw\_slice\_seek()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} eina\+\_\+rw\+\_\+slice\+\_\+seek (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{rw\+\_\+slice,  }\item[{ssize\+\_\+t}]{offset,  }\item[{int}]{whence }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Seek within a read-\/write slice, similar to fseek(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rw\+\_\+slice} & the containing slice to seek inside. \\
\hline
\mbox{\texttt{ in}}  & {\em offset} & how to get to the new position. \\
\hline
\mbox{\texttt{ in}}  & {\em whence} & SEEK\+\_\+\+SET, SEEK\+\_\+\+END as fseek(). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a new slice contained inside, it will start at the given offset and have a length that goes until the end of the {\itshape rw\+\_\+slice}. If an invalid {\itshape whence}, a zero-\/sized slice starting at {\itshape rw\+\_\+slice} mem will be returned. The slice is guaranteed to be contained within {\itshape rw\+\_\+slice}, even if offset causes it to go out of bounds, then it will be clamped to 0 and slice.\+len.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga529b6d1a3961bc0a6bc2b13aabde2709}\label{group__Eina__Slice__Group_ga529b6d1a3961bc0a6bc2b13aabde2709}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_strchr@{eina\_slice\_strchr}}
\index{eina\_slice\_strchr@{eina\_slice\_strchr}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_strchr()}{eina\_slice\_strchr()}}
{\footnotesize\ttfamily static const void $\ast$ eina\+\_\+slice\+\_\+strchr (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice,  }\item[{int}]{c }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Find a character inside the slice, similar to memchr(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em c} & the byte (character) to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily NULL} if not found.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gab7ad1806302980e127e1e01f7bcb68a4}\label{group__Eina__Slice__Group_gab7ad1806302980e127e1e01f7bcb68a4}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_find@{eina\_slice\_find}}
\index{eina\_slice\_find@{eina\_slice\_find}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_find()}{eina\_slice\_find()}}
{\footnotesize\ttfamily static const void $\ast$ eina\+\_\+slice\+\_\+find (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{needle }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Find a needle inside the slice, similar to memmem(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em needle} & what to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily NULL} if not found.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gad0bd7f5338abb955a66b1b1764432131}\label{group__Eina__Slice__Group_gad0bd7f5338abb955a66b1b1764432131}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_startswith@{eina\_slice\_startswith}}
\index{eina\_slice\_startswith@{eina\_slice\_startswith}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_startswith()}{eina\_slice\_startswith()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+slice\+\_\+startswith (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{prefix }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Checks if the slice starts with a prefix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em prefix} & the slice to check if {\itshape slice} starts with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if {\itshape slice} starts with {\itshape prefix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gaae695a0c6a9f1521885638a5dff160a1}\label{group__Eina__Slice__Group_gaae695a0c6a9f1521885638a5dff160a1}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_endswith@{eina\_slice\_endswith}}
\index{eina\_slice\_endswith@{eina\_slice\_endswith}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_endswith()}{eina\_slice\_endswith()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+slice\+\_\+endswith (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{suffix }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Checks if the slice ends with a suffix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em suffix} & the slice to check if {\itshape slice} ends with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if {\itshape slice} ends with {\itshape suffix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga896b2b6363b71e53b40d8f05d5b27768}\label{group__Eina__Slice__Group_ga896b2b6363b71e53b40d8f05d5b27768}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_strchr@{eina\_rw\_slice\_strchr}}
\index{eina\_rw\_slice\_strchr@{eina\_rw\_slice\_strchr}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_strchr()}{eina\_rw\_slice\_strchr()}}
{\footnotesize\ttfamily static void $\ast$ eina\+\_\+rw\+\_\+slice\+\_\+strchr (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{rw\+\_\+slice,  }\item[{int}]{c }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Find a character inside the slice, similar to memchr(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rw\+\_\+slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em c} & the byte (character) to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily NULL} if not found.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gac6d77db792aa53626572b90c6e7c966f}\label{group__Eina__Slice__Group_gac6d77db792aa53626572b90c6e7c966f}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_find@{eina\_rw\_slice\_find}}
\index{eina\_rw\_slice\_find@{eina\_rw\_slice\_find}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_find()}{eina\_rw\_slice\_find()}}
{\footnotesize\ttfamily static void $\ast$ eina\+\_\+rw\+\_\+slice\+\_\+find (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{rw\+\_\+slice,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{needle }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Find a needle inside the slice, similar to memmem(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rw\+\_\+slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em needle} & what to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily NULL} if not found.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga7fccc37aae0a3eba9c8f36a3b7721f1b}\label{group__Eina__Slice__Group_ga7fccc37aae0a3eba9c8f36a3b7721f1b}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_startswith@{eina\_rw\_slice\_startswith}}
\index{eina\_rw\_slice\_startswith@{eina\_rw\_slice\_startswith}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_startswith()}{eina\_rw\_slice\_startswith()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+rw\+\_\+slice\+\_\+startswith (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{slice,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{prefix }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Checks if the slice starts with a prefix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em prefix} & the slice to check if {\itshape slice} starts with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if {\itshape slice} starts with {\itshape prefix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga93b54c8d98bc7e09c7bc6f74e74e7039}\label{group__Eina__Slice__Group_ga93b54c8d98bc7e09c7bc6f74e74e7039}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_endswith@{eina\_rw\_slice\_endswith}}
\index{eina\_rw\_slice\_endswith@{eina\_rw\_slice\_endswith}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_endswith()}{eina\_rw\_slice\_endswith()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+rw\+\_\+slice\+\_\+endswith (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{slice,  }\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{suffix }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Checks if the slice ends with a suffix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\mbox{\texttt{ in}}  & {\em suffix} & the slice to check if {\itshape slice} ends with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if {\itshape slice} ends with {\itshape suffix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga199d8aeb7a6cfe1828725d5f805ea3ac}\label{group__Eina__Slice__Group_ga199d8aeb7a6cfe1828725d5f805ea3ac}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_end\_get@{eina\_slice\_end\_get}}
\index{eina\_slice\_end\_get@{eina\_slice\_end\_get}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_end\_get()}{eina\_slice\_end\_get()}}
{\footnotesize\ttfamily static const void $\ast$ eina\+\_\+slice\+\_\+end\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



The memory position where the slice ends. 

\begin{DoxyNote}{Note}
this is out-\/of the slice, the first byte after it ends and must not be accessed.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the first byte after the slice ends.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gaeba4a347e277aa3c45272d788cfdb165}\label{group__Eina__Slice__Group_gaeba4a347e277aa3c45272d788cfdb165}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_end\_get@{eina\_rw\_slice\_end\_get}}
\index{eina\_rw\_slice\_end\_get@{eina\_rw\_slice\_end\_get}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_end\_get()}{eina\_rw\_slice\_end\_get()}}
{\footnotesize\ttfamily static void $\ast$ eina\+\_\+rw\+\_\+slice\+\_\+end\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{rw\+\_\+slice }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



The memory position where the slice ends. 

\begin{DoxyNote}{Note}
this is out-\/of the slice, the first byte after it ends and must not be accessed.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rw\+\_\+slice} & the reference memory. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the first byte after the slice ends.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga2a24c0cf8ee1a7276297ef534c2002ed}\label{group__Eina__Slice__Group_ga2a24c0cf8ee1a7276297ef534c2002ed}} 
\index{Memory Slices@{Memory Slices}!eina\_slice\_strdup@{eina\_slice\_strdup}}
\index{eina\_slice\_strdup@{eina\_slice\_strdup}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_slice\_strdup()}{eina\_slice\_strdup()}}
{\footnotesize\ttfamily static char $\ast$ eina\+\_\+slice\+\_\+strdup (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}}}]{slice }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



A null-\/terminated string for this slice. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em slice} & the reference memory. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
newly allocated memory or {\ttfamily NULL} on error
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga31f77f0db0f630e3bbabf44a23a13df1}\label{group__Eina__Slice__Group_ga31f77f0db0f630e3bbabf44a23a13df1}} 
\index{Memory Slices@{Memory Slices}!eina\_rw\_slice\_strdup@{eina\_rw\_slice\_strdup}}
\index{eina\_rw\_slice\_strdup@{eina\_rw\_slice\_strdup}!Memory Slices@{Memory Slices}}
\doxysubsubsection{\texorpdfstring{eina\_rw\_slice\_strdup()}{eina\_rw\_slice\_strdup()}}
{\footnotesize\ttfamily static char $\ast$ eina\+\_\+rw\+\_\+slice\+\_\+strdup (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}}}]{rw\+\_\+slice }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



A null-\/terminated string for this slice. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rw\+\_\+slice} & the reference memory. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
newly allocated memory or {\ttfamily NULL} on error
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
