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


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


\subsection*{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}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+AY}}(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}{E\+I\+N\+A\+\_\+\+R\+W\+\_\+\+S\+L\+I\+C\+E\+\_\+\+D\+E\+C\+L\+A\+RE}}(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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+AL}}(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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+TR}}(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_gafcfddc473933c1c23485a16ae7ec79d8}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT}}~\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 need the null terminator. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+NT}}(s)~(int)(s).len, (const char $\ast$)(s).mem
\begin{DoxyCompactList}\small\item\em To be used in printf()-\/like statements when E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT 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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT}}~\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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+NT}}(s)~(s).mem, (s).len
\begin{DoxyCompactList}\small\item\em To be used in printf()-\/like statements when E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT was used, it will print the slice {\ttfamily mem} and {\ttfamily len}. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{group__Eina__Slice__Group_ga99945401c9af5e354a71d319cbeb6cfd}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+O\+R\+E\+A\+CH}}(s,  itr)
\begin{DoxyCompactList}\small\item\em Iterate over the slice memory, using {\ttfamily itr}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{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}
\subsection*{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_ga4b4d2d8b6cbecf992a29c04730339d14}{eina\+\_\+slice\+\_\+dup}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gab75399abc5bb50cf1135cb8485cbedcc}{Eina\+\_\+\+Slice}} slice) \mbox{\hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}}
\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_ga95d2904ba1dff3d8be8cf2c95e05bf53}{eina\+\_\+rw\+\_\+slice\+\_\+dup}} (const \mbox{\hyperlink{group__Eina__Slice__Group_gad43ea51c6434252512a3e7305cea4af3}{Eina\+\_\+\+Rw\+\_\+\+Slice}} rw\+\_\+slice) \mbox{\hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+LT}}
\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_ga4e871a0013a9f1448eeeb6473c126d41}{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_ga8ded59108657a4f821d1ed27ebaa8809}{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_ga76356f5809f23775fc60e161af797bb5}{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_gaad954eab75de21ab4e2f80bf259dd5fe}{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_gabcc77a85b294e3009dbf727ee50118b3}{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_gad14afac46004eabd382577992bb5f36e}{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_gacfc92d04a9050cdd351e410b092ee289}{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_gaa3366bc577cf93f32a50cad60350e29b}{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}


\subsection{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}


\subsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}\label{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}} 
\index{Memory Slices@{Memory Slices}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+AY@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+AY}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+AY@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+AY}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+AY}{EINA\_SLICE\_ARRAY}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+AY(\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. 

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}
\textcolor{keyword}{static} uint8\_t buf[1024];
\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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+A\+L()}} 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}!E\+I\+N\+A\+\_\+\+R\+W\+\_\+\+S\+L\+I\+C\+E\+\_\+\+D\+E\+C\+L\+A\+RE@{E\+I\+N\+A\+\_\+\+R\+W\+\_\+\+S\+L\+I\+C\+E\+\_\+\+D\+E\+C\+L\+A\+RE}}
\index{E\+I\+N\+A\+\_\+\+R\+W\+\_\+\+S\+L\+I\+C\+E\+\_\+\+D\+E\+C\+L\+A\+RE@{E\+I\+N\+A\+\_\+\+R\+W\+\_\+\+S\+L\+I\+C\+E\+\_\+\+D\+E\+C\+L\+A\+RE}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+R\+W\+\_\+\+S\+L\+I\+C\+E\+\_\+\+D\+E\+C\+L\+A\+RE}{EINA\_RW\_SLICE\_DECLARE}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+R\+W\+\_\+\+S\+L\+I\+C\+E\+\_\+\+D\+E\+C\+L\+A\+RE(\begin{DoxyParamCaption}\item[{}]{name,  }\item[{}]{length }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
uint8\_t \_eina\_slice\_storage\_ ## name [(length)] = \{ 0 \}; \(\backslash\)
  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}{Parameters}
{\em name} & the name of the variable to be the Eina\+\_\+\+Rw\+\_\+\+Slice \\
\hline
{\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}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+AL@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+AL}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+AL@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+AL}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+AL}{EINA\_SLICE\_STR\_LITERAL}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+L\+I\+T\+E\+R\+AL(\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 N\+OT} include the trainling null-\/terminator.

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}
\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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R()}} for more generic version. 

\mbox{\hyperlink{group__Eina__Slice__Group_ga76bfd01b6c25d3cf4fe8dac16eda4526}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+A\+R\+R\+A\+Y()}} 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}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+TR@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+TR}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+TR@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+TR}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+TR}{EINA\_SLICE\_STR}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+TR(\begin{DoxyParamCaption}\item[{}]{str }\end{DoxyParamCaption})~\{.len = strlen((str)), .mem = (str)\}}



Initializer for strings (uses strlen()). 

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

\begin{DoxyCode}
\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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R()}} for specific version using literals.
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gafcfddc473933c1c23485a16ae7ec79d8}\label{group__Eina__Slice__Group_gafcfddc473933c1c23485a16ae7ec79d8}} 
\index{Memory Slices@{Memory Slices}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT}{EINA\_SLICE\_STR\_FMT}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT~\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 need the null terminator. 

Use with \mbox{\hyperlink{group__Eina__Slice__Group_ga046e5523ec004c184e0ead158fe1f889}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+N\+T()}}

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

\begin{DoxyCode}
\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}} s = \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"hello"});
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}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+NT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+NT}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+NT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+NT}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+NT}{EINA\_SLICE\_STR\_PRINT}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+P\+R\+I\+NT(\begin{DoxyParamCaption}\item[{}]{s }\end{DoxyParamCaption})~(int)(s).len, (const char $\ast$)(s).mem}



To be used in printf()-\/like statements when E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT was used, it will print the slice as a string up to {\ttfamily len}. 

Use with E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+S\+T\+R\+\_\+\+F\+MT.

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

\begin{DoxyCode}
\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}} s = \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"hello"});
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}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT}{EINA\_SLICE\_FMT}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT~\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}{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+N\+T()}}

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

\begin{DoxyCode}
\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}} s = \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"hello"});
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}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+NT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+NT}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+NT@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+NT}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+NT}{EINA\_SLICE\_PRINT}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+P\+R\+I\+NT(\begin{DoxyParamCaption}\item[{}]{s }\end{DoxyParamCaption})~(s).mem, (s).len}



To be used in printf()-\/like statements when E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT was used, it will print the slice {\ttfamily mem} and {\ttfamily len}. 

Use with E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+MT.

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

\begin{DoxyParams}{Parameters}
{\em s} & the slice\\
\hline
\end{DoxyParams}

\begin{DoxyCode}
\mbox{\hyperlink{struct__Eina__Slice}{Eina\_Slice}} s = \mbox{\hyperlink{group__Eina__Slice__Group_ga1d288b53fafb50405cc26c98a20a452e}{EINA\_SLICE\_STR\_LITERAL}}(\textcolor{stringliteral}{"hello"});
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}!E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+O\+R\+E\+A\+CH}}
\index{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+O\+R\+E\+A\+CH}!Memory Slices@{Memory Slices}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+O\+R\+E\+A\+CH}{EINA\_SLICE\_FOREACH}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+S\+L\+I\+C\+E\+\_\+\+F\+O\+R\+E\+A\+CH(\begin{DoxyParamCaption}\item[{}]{s,  }\item[{}]{itr }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{for} ((itr) = (s).mem; \(\backslash\)
       (\textcolor{keywordtype}{void} *)(itr) < (\textcolor{keywordtype}{void} *)((s).bytes + (s).len); \(\backslash\)
       (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}{Parameters}
{\em s} & the slice \\
\hline
{\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}


\subsection{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}}
\subsubsection{\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}}
\subsubsection{\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}


\subsection{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}}
\subsubsection{\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}{Parameters}
{\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_ga4b4d2d8b6cbecf992a29c04730339d14}\label{group__Eina__Slice__Group_ga4b4d2d8b6cbecf992a29c04730339d14}} 
\index{Memory Slices@{Memory Slices}!eina\+\_\+slice\+\_\+dup@{eina\+\_\+slice\+\_\+dup}}
\index{eina\+\_\+slice\+\_\+dup@{eina\+\_\+slice\+\_\+dup}!Memory Slices@{Memory Slices}}
\subsubsection{\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}{Parameters}
{\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_ga95d2904ba1dff3d8be8cf2c95e05bf53}{eina\+\_\+rw\+\_\+slice\+\_\+dup()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga95d2904ba1dff3d8be8cf2c95e05bf53}\label{group__Eina__Slice__Group_ga95d2904ba1dff3d8be8cf2c95e05bf53}} 
\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}}
\subsubsection{\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}{Parameters}
{\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_ga4b4d2d8b6cbecf992a29c04730339d14}{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}}
\subsubsection{\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}{Parameters}
{\em a} & the first slice to compare. \\
\hline
{\em b} & the second slice to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if equal, $<$ 0 if a $<$ b, $>$ 0 if a $>$ 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}}
\subsubsection{\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}{Parameters}
{\em a} & the first slice to compare. \\
\hline
{\em b} & the second slice to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if equal, $<$ 0 if a $<$ b, $>$ 0 if a $>$ 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}}
\subsubsection{\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}{Parameters}
{\em dest} & where to write the memory. \\
\hline
{\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_ga95d2904ba1dff3d8be8cf2c95e05bf53}{eina\+\_\+rw\+\_\+slice\+\_\+dup()}} 

\mbox{\hyperlink{group__Eina__Slice__Group_ga4b4d2d8b6cbecf992a29c04730339d14}{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}}
\subsubsection{\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}{Parameters}
{\em slice} & the containing slice to seek inside. \\
\hline
{\em offset} & how to get to the new position. \\
\hline
{\em whence} & S\+E\+E\+K\+\_\+\+S\+ET, S\+E\+E\+K\+\_\+\+E\+ND 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}}
\subsubsection{\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}{Parameters}
{\em rw\+\_\+slice} & the containing slice to seek inside. \\
\hline
{\em offset} & how to get to the new position. \\
\hline
{\em whence} & S\+E\+E\+K\+\_\+\+S\+ET, S\+E\+E\+K\+\_\+\+E\+ND 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_ga4e871a0013a9f1448eeeb6473c126d41}\label{group__Eina__Slice__Group_ga4e871a0013a9f1448eeeb6473c126d41}} 
\index{Memory Slices@{Memory Slices}!eina\+\_\+slice\+\_\+strchr@{eina\+\_\+slice\+\_\+strchr}}
\index{eina\+\_\+slice\+\_\+strchr@{eina\+\_\+slice\+\_\+strchr}!Memory Slices@{Memory Slices}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
{\em c} & the byte (character) to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily N\+U\+LL} if not found.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga8ded59108657a4f821d1ed27ebaa8809}\label{group__Eina__Slice__Group_ga8ded59108657a4f821d1ed27ebaa8809}} 
\index{Memory Slices@{Memory Slices}!eina\+\_\+slice\+\_\+find@{eina\+\_\+slice\+\_\+find}}
\index{eina\+\_\+slice\+\_\+find@{eina\+\_\+slice\+\_\+find}!Memory Slices@{Memory Slices}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
{\em needle} & what to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily N\+U\+LL} 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}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
{\em prefix} & the slice to check if {\itshape slice} starts with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} if {\itshape slice} starts with {\itshape prefix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
{\em suffix} & the slice to check if {\itshape slice} ends with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} if {\itshape slice} ends with {\itshape suffix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_ga76356f5809f23775fc60e161af797bb5}\label{group__Eina__Slice__Group_ga76356f5809f23775fc60e161af797bb5}} 
\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}}
\subsubsection{\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}{Parameters}
{\em rw\+\_\+slice} & the reference memory. \\
\hline
{\em c} & the byte (character) to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily N\+U\+LL} if not found.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gaad954eab75de21ab4e2f80bf259dd5fe}\label{group__Eina__Slice__Group_gaad954eab75de21ab4e2f80bf259dd5fe}} 
\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}}
\subsubsection{\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}{Parameters}
{\em rw\+\_\+slice} & the reference memory. \\
\hline
{\em needle} & what to find. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the memory within slice or {\ttfamily N\+U\+LL} 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}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
{\em prefix} & the slice to check if {\itshape slice} starts with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} if {\itshape slice} starts with {\itshape prefix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
{\em suffix} & the slice to check if {\itshape slice} ends with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} if {\itshape slice} ends with {\itshape suffix}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gabcc77a85b294e3009dbf727ee50118b3}\label{group__Eina__Slice__Group_gabcc77a85b294e3009dbf727ee50118b3}} 
\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}}
\subsubsection{\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}{Parameters}
{\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_gad14afac46004eabd382577992bb5f36e}\label{group__Eina__Slice__Group_gad14afac46004eabd382577992bb5f36e}} 
\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}}
\subsubsection{\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}{Parameters}
{\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_gacfc92d04a9050cdd351e410b092ee289}\label{group__Eina__Slice__Group_gacfc92d04a9050cdd351e410b092ee289}} 
\index{Memory Slices@{Memory Slices}!eina\+\_\+slice\+\_\+strdup@{eina\+\_\+slice\+\_\+strdup}}
\index{eina\+\_\+slice\+\_\+strdup@{eina\+\_\+slice\+\_\+strdup}!Memory Slices@{Memory Slices}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
newly allocated memory or {\ttfamily N\+U\+LL} on error
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Slice__Group_gaa3366bc577cf93f32a50cad60350e29b}\label{group__Eina__Slice__Group_gaa3366bc577cf93f32a50cad60350e29b}} 
\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}}
\subsubsection{\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}{Parameters}
{\em slice} & the reference memory. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
newly allocated memory or {\ttfamily N\+U\+LL} on error
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+19 
\end{DoxySince}
