\hypertarget{group__Eina__Stringshare__Group}{\section{Stringshare}
\label{group__Eina__Stringshare__Group}\index{Stringshare@{Stringshare}}
}


These functions allow you to store a single copy of a string, and use in multiple places throughout your program.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef const char \hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare}
\begin{DoxyCompactList}\small\item\em \char`\"{}\+Eina\+\_\+\+Stringshare $\ast$\char`\"{} is interchangeable with \char`\"{}const char $\ast$\char`\"{} but still a good visual hint for the purpose. \end{DoxyCompactList}\item 
typedef const char \hyperlink{group__Eina__Stringshare__Group_gae8d53f367d5da5acfd19af6c235831d5}{Eina\+\_\+\+Tmpstr}
\begin{DoxyCompactList}\small\item\em Interchangeable with \char`\"{}const char $\ast$\char`\"{} but still a good visual hint for the purpose. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$ \hyperlink{group__Eina__Stringshare__Group_ga7102630f25d779cd216e48f1369f65b1}{eina\+\_\+stringshare\+\_\+add\+\_\+length} (const char $\ast$str, unsigned int slen) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T}
\begin{DoxyCompactList}\small\item\em Retrieve an instance of a string with a specific size for use in a program. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$ \hyperlink{group__Eina__Stringshare__Group_gac7a3f073cafb7af63b2c7cc2eabd1c1f}{eina\+\_\+stringshare\+\_\+add} (const char $\ast$str) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T}
\begin{DoxyCompactList}\small\item\em Retrieve an instance of a string for use in a program. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$ \hyperlink{group__Eina__Stringshare__Group_ga7f45007b1b76bc15fac0f26ae4a6bb77}{eina\+\_\+stringshare\+\_\+printf} (const char $\ast$fmt,...) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T} \hyperlink{group__Eina__Types__Group_ga50265482f1d9b18e4b98e97cfa2c8d05}{E\+I\+N\+A\+\_\+\+P\+R\+I\+N\+T\+F}(1
\begin{DoxyCompactList}\small\item\em Retrieve an instance of a string for use in a program from a format string. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \\*
\hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$ \hyperlink{group__Eina__Stringshare__Group_gad111348c41fa3a868e6e152bf1afa688}{eina\+\_\+stringshare\+\_\+vprintf} (const char $\ast$fmt, va\+\_\+list args) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T}
\begin{DoxyCompactList}\small\item\em Retrieve an instance of a string for use in a program from a format string. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$ \hyperlink{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}{eina\+\_\+stringshare\+\_\+nprintf} (unsigned int len, const char $\ast$fmt,...) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T} \hyperlink{group__Eina__Types__Group_ga50265482f1d9b18e4b98e97cfa2c8d05}{E\+I\+N\+A\+\_\+\+P\+R\+I\+N\+T\+F}(2
\begin{DoxyCompactList}\small\item\em Retrieve an instance of a string for use in a program from a format string with size limitation. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} \hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \\*
\hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$ \hyperlink{group__Eina__Stringshare__Group_ga4e18c53f96ce4eaa82c5e5dc94e575d5}{eina\+\_\+stringshare\+\_\+ref} (\hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$str)
\begin{DoxyCompactList}\small\item\em Increment references of the given shared string. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\+\_\+stringshare\+\_\+del} (\hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$str)
\begin{DoxyCompactList}\small\item\em Note that the given string has lost an instance. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} int \hyperlink{group__Eina__Stringshare__Group_ga55b2653599f130044d88e7b854235c2a}{eina\+\_\+stringshare\+\_\+strlen} (\hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$str) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\+I\+N\+A\+\_\+\+P\+U\+R\+E} \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T}
\begin{DoxyCompactList}\small\item\em Note that the given string {\bfseries must} be shared. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__Stringshare__Group_gae3500379815105ff0759aabd95cea5d7}{eina\+\_\+stringshare\+\_\+dump} (void)
\begin{DoxyCompactList}\small\item\em Dump the contents of the share\+\_\+common. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Stringshare__Group_gaf7eda1220a9da2dda61e4fa6b777e70c}{static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries eina\+\_\+stringshare\+\_\+replace} (\hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$$\ast$p\+\_\+str, const char $\ast$news) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)}\label{group__Eina__Stringshare__Group_gaf7eda1220a9da2dda61e4fa6b777e70c}

\item 
\hypertarget{group__Eina__Stringshare__Group_ga77ae24ff168b1d736769dfd819081b9d}{static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} {\bfseries eina\+\_\+stringshare\+\_\+replace\+\_\+length} (\hyperlink{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{Eina\+\_\+\+Stringshare} $\ast$$\ast$p\+\_\+str, const char $\ast$news, unsigned int slen) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)}\label{group__Eina__Stringshare__Group_ga77ae24ff168b1d736769dfd819081b9d}

\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_gae8d53f367d5da5acfd19af6c235831d5}{Eina\+\_\+\+Tmpstr} $\ast$ \hyperlink{group__Eina__Stringshare__Group_gadb653e2dd0baf58b7f8bb7eea1753b2b}{eina\+\_\+tmpstr\+\_\+add} (const char $\ast$str) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\+I\+N\+A\+\_\+\+W\+A\+R\+N\+\_\+\+U\+N\+U\+S\+E\+D\+\_\+\+R\+E\+S\+U\+L\+T}
\begin{DoxyCompactList}\small\item\em Add a new temporary string based on the input string. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Stringshare__Group_gae8d53f367d5da5acfd19af6c235831d5}{Eina\+\_\+\+Tmpstr} $\ast$ \hyperlink{group__Eina__Stringshare__Group_ga6fb1f760eedc7796dc99247e51c6cba2}{eina\+\_\+tmpstr\+\_\+add\+\_\+length} (const char $\ast$str, size\+\_\+t length)
\begin{DoxyCompactList}\small\item\em Add a new temporary string based on the input string and length. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} size\+\_\+t \hyperlink{group__Eina__Stringshare__Group_gad62b594b32ef8546764915bdcbd866fa}{eina\+\_\+tmpstr\+\_\+strlen} (\hyperlink{group__Eina__Stringshare__Group_gae8d53f367d5da5acfd19af6c235831d5}{Eina\+\_\+\+Tmpstr} $\ast$tmpstr)
\begin{DoxyCompactList}\small\item\em Return the length of a temporary string including the '\textbackslash{}0'. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} void \hyperlink{group__Eina__Stringshare__Group_gaa84ec3cc6c63bc67355aa3cbaa26189f}{eina\+\_\+tmpstr\+\_\+del} (\hyperlink{group__Eina__Stringshare__Group_gae8d53f367d5da5acfd19af6c235831d5}{Eina\+\_\+\+Tmpstr} $\ast$tmpstr) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\+I\+N\+A\+\_\+\+A\+R\+G\+\_\+\+N\+O\+N\+N\+U\+L\+L}(1)
\begin{DoxyCompactList}\small\item\em Delete the temporary string if it is one, or ignore it if it is not. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
These functions allow you to store a single copy of a string, and use in multiple places throughout your program. 

This is a method to reduce the number of duplicated strings kept in memory. It's pretty common for the same strings to be dynamically allocated repeatedly between applications and libraries, especially in circumstances where you could have multiple copies of a structure that allocates the string. So rather than duplicating and freeing these strings, you request a read-\/only pointer to an existing string and only incur the overhead of a hash lookup.

It sounds like micro-\/optimizing, but profiling has shown this can have a significant impact as you scale the number of copies up. It improves string creation/destruction speed, reduces memory use and decreases memory fragmentation, so a win all-\/around.

Using eina stringshares usually boils down to\+: 
\begin{DoxyCode}
\textcolor{keyword}{const} \textcolor{keywordtype}{char} *str = \hyperlink{group__Eina__Stringshare__Group_gac7a3f073cafb7af63b2c7cc2eabd1c1f}{eina\_stringshare\_add}(\textcolor{stringliteral}{"My string"});
...
\textcolor{comment}{//Use str}
...
\hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\_stringshare\_del}(str);
\end{DoxyCode}
 \begin{DoxyNote}{Note}
It's very important to note that string shares are {\bfseries {\ttfamily const},} changing them will result in undefined behavior. 

\hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\+\_\+stringshare\+\_\+del()} {\bfseries doesn't} guarantee the string share will be freed, it releases a reference to it, but if other references to it still exist the string share will live until those are released.
\end{DoxyNote}
The following diagram gives an idea of what happens as you create strings with \hyperlink{group__Eina__Stringshare__Group_gac7a3f073cafb7af63b2c7cc2eabd1c1f}{eina\+\_\+stringshare\+\_\+add()}\+:

 
\begin{DoxyImage}
\includegraphics{eina_stringshare}
\caption{height=}
\end{DoxyImage}


For more information, see \hyperlink{eina_stringshare_example_01_page}{this example}. 

\subsection{Typedef Documentation}
\hypertarget{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}{\index{Stringshare@{Stringshare}!Eina\+\_\+\+Stringshare@{Eina\+\_\+\+Stringshare}}
\index{Eina\+\_\+\+Stringshare@{Eina\+\_\+\+Stringshare}!Stringshare@{Stringshare}}
\subsubsection[{Eina\+\_\+\+Stringshare}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Stringshare}}}\label{group__Eina__Stringshare__Group_ga2b7dc19609a55e630a96cc1396e38a53}


\char`\"{}\+Eina\+\_\+\+Stringshare $\ast$\char`\"{} is interchangeable with \char`\"{}const char $\ast$\char`\"{} but still a good visual hint for the purpose. 

Maybe in the far far future we'll even add strict type checking.

\begin{DoxySince}{Since}
1.\+2.\+0 
\end{DoxySince}
\hypertarget{group__Eina__Stringshare__Group_gae8d53f367d5da5acfd19af6c235831d5}{\index{Stringshare@{Stringshare}!Eina\+\_\+\+Tmpstr@{Eina\+\_\+\+Tmpstr}}
\index{Eina\+\_\+\+Tmpstr@{Eina\+\_\+\+Tmpstr}!Stringshare@{Stringshare}}
\subsubsection[{Eina\+\_\+\+Tmpstr}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Tmpstr}}}\label{group__Eina__Stringshare__Group_gae8d53f367d5da5acfd19af6c235831d5}


Interchangeable with \char`\"{}const char $\ast$\char`\"{} but still a good visual hint for the purpose. 

This indicates the string is temporary and should be freed after use.

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


\subsection{Function Documentation}
\hypertarget{group__Eina__Stringshare__Group_ga7102630f25d779cd216e48f1369f65b1}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+add\+\_\+length@{eina\+\_\+stringshare\+\_\+add\+\_\+length}}
\index{eina\+\_\+stringshare\+\_\+add\+\_\+length@{eina\+\_\+stringshare\+\_\+add\+\_\+length}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+add\+\_\+length}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare}$\ast$ eina\+\_\+stringshare\+\_\+add\+\_\+length (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{unsigned int}]{slen}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_ga7102630f25d779cd216e48f1369f65b1}


Retrieve an instance of a string with a specific size for use in a program. 


\begin{DoxyParams}{Parameters}
{\em str} & The string to retrieve an instance of. \\
\hline
{\em slen} & The string size ($<$= strlen(str)). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to an instance of the string on success. {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
This function retrieves an instance of {\ttfamily str}. If {\ttfamily str} is {\ttfamily N\+U\+L\+L}, then {\ttfamily N\+U\+L\+L} is returned. If {\ttfamily str} is already stored, it is just returned and its reference counter is increased. Otherwise a duplicated string of {\ttfamily str} is returned.

This function does not check string size, but uses the exact given size. This can be used to share\+\_\+common part of a larger buffer or substring.

\begin{DoxySeeAlso}{See also}
eina\+\_\+share\+\_\+common\+\_\+add() 
\end{DoxySeeAlso}


References eina\+\_\+spinlock\+\_\+release(), and eina\+\_\+spinlock\+\_\+take().



Referenced by eet\+\_\+open(), efreet\+\_\+icon\+\_\+deprecated\+\_\+user\+\_\+dir\+\_\+get(), efreet\+\_\+icon\+\_\+user\+\_\+dir\+\_\+get(), eina\+\_\+stringshare\+\_\+add(), and eina\+\_\+stringshare\+\_\+vprintf().

\hypertarget{group__Eina__Stringshare__Group_gac7a3f073cafb7af63b2c7cc2eabd1c1f}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+add@{eina\+\_\+stringshare\+\_\+add}}
\index{eina\+\_\+stringshare\+\_\+add@{eina\+\_\+stringshare\+\_\+add}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare}$\ast$ eina\+\_\+stringshare\+\_\+add (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_gac7a3f073cafb7af63b2c7cc2eabd1c1f}


Retrieve an instance of a string for use in a program. 


\begin{DoxyParams}{Parameters}
{\em str} & The N\+U\+L\+L-\/terminated string to retrieve an instance of. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to an instance of the string on success. {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
This function retrieves an instance of {\ttfamily str}. If {\ttfamily str} is {\ttfamily N\+U\+L\+L}, then {\ttfamily N\+U\+L\+L} is returned. If {\ttfamily str} is already stored, it is just returned and its reference counter is increased. Otherwise a duplicated string of {\ttfamily str} is returned.

The string {\ttfamily str} must be N\+U\+L\+L terminated ('\textbackslash{}0') and its full length will be used. To use part of the string or non-\/null terminated, use \hyperlink{group__Eina__Stringshare__Group_ga7102630f25d779cd216e48f1369f65b1}{eina\+\_\+stringshare\+\_\+add\+\_\+length()} instead.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Stringshare__Group_ga7102630f25d779cd216e48f1369f65b1}{eina\+\_\+stringshare\+\_\+add\+\_\+length()} 
\end{DoxySeeAlso}


References eina\+\_\+stringshare\+\_\+add\+\_\+length().



Referenced by ecore\+\_\+con\+\_\+eet\+\_\+data\+\_\+callback\+\_\+add(), ecore\+\_\+con\+\_\+eet\+\_\+raw\+\_\+data\+\_\+callback\+\_\+add(), ecore\+\_\+con\+\_\+socks4\+\_\+remote\+\_\+add(), ecore\+\_\+con\+\_\+socks5\+\_\+remote\+\_\+add(), ecore\+\_\+drm\+\_\+device\+\_\+find(), ecore\+\_\+drm\+\_\+tty\+\_\+open(), ecore\+\_\+evas\+\_\+aux\+\_\+hint\+\_\+add(), ecore\+\_\+evas\+\_\+aux\+\_\+hint\+\_\+val\+\_\+set(), edje\+\_\+available\+\_\+modules\+\_\+get(), edje\+\_\+color\+\_\+class\+\_\+set(), edje\+\_\+edit\+\_\+color\+\_\+class\+\_\+add(), edje\+\_\+edit\+\_\+color\+\_\+class\+\_\+name\+\_\+set(), edje\+\_\+edit\+\_\+color\+\_\+classes\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+compiler\+\_\+get(), edje\+\_\+edit\+\_\+data\+\_\+add(), edje\+\_\+edit\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+data\+\_\+value\+\_\+get(), edje\+\_\+edit\+\_\+data\+\_\+value\+\_\+set(), edje\+\_\+edit\+\_\+external\+\_\+add(), edje\+\_\+edit\+\_\+externals\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+font\+\_\+add(), edje\+\_\+edit\+\_\+font\+\_\+path\+\_\+get(), edje\+\_\+edit\+\_\+fonts\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+add(), edje\+\_\+edit\+\_\+group\+\_\+alias\+\_\+add(), edje\+\_\+edit\+\_\+group\+\_\+aliased\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+aliases\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+copy(), edje\+\_\+edit\+\_\+group\+\_\+data\+\_\+add(), edje\+\_\+edit\+\_\+group\+\_\+data\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+data\+\_\+value\+\_\+get(), edje\+\_\+edit\+\_\+group\+\_\+data\+\_\+value\+\_\+set(), edje\+\_\+edit\+\_\+group\+\_\+name\+\_\+set(), edje\+\_\+edit\+\_\+image\+\_\+add(), edje\+\_\+edit\+\_\+image\+\_\+data\+\_\+add(), edje\+\_\+edit\+\_\+images\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+part\+\_\+above\+\_\+get(), edje\+\_\+edit\+\_\+part\+\_\+below\+\_\+get(), edje\+\_\+edit\+\_\+part\+\_\+copy(), edje\+\_\+edit\+\_\+part\+\_\+item\+\_\+append(), edje\+\_\+edit\+\_\+part\+\_\+item\+\_\+source\+\_\+get(), edje\+\_\+edit\+\_\+part\+\_\+item\+\_\+source\+\_\+set(), edje\+\_\+edit\+\_\+part\+\_\+items\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+part\+\_\+name\+\_\+set(), edje\+\_\+edit\+\_\+part\+\_\+selected\+\_\+state\+\_\+get(), edje\+\_\+edit\+\_\+part\+\_\+source\+\_\+get(), edje\+\_\+edit\+\_\+part\+\_\+source\+\_\+set(), edje\+\_\+edit\+\_\+part\+\_\+states\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+parts\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+add(), edje\+\_\+edit\+\_\+program\+\_\+api\+\_\+description\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+api\+\_\+description\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+api\+\_\+name\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+api\+\_\+name\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+filter\+\_\+part\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+filter\+\_\+part\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+filter\+\_\+state\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+filter\+\_\+state\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+name\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+signal\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+signal\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+source\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+source\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+state2\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+state2\+\_\+set(), edje\+\_\+edit\+\_\+program\+\_\+state\+\_\+get(), edje\+\_\+edit\+\_\+program\+\_\+state\+\_\+set(), edje\+\_\+edit\+\_\+programs\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+sound\+\_\+sample\+\_\+add(), edje\+\_\+edit\+\_\+sound\+\_\+samples\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+sound\+\_\+samplesource\+\_\+get(), edje\+\_\+edit\+\_\+sound\+\_\+tone\+\_\+add(), edje\+\_\+edit\+\_\+sound\+\_\+tones\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+source\+\_\+generate(), edje\+\_\+edit\+\_\+state\+\_\+add(), edje\+\_\+edit\+\_\+state\+\_\+color\+\_\+class\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+color\+\_\+class\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+external\+\_\+param\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+font\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+font\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+image\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+map\+\_\+light\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+map\+\_\+perspective\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+map\+\_\+rotation\+\_\+center\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+name\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+proxy\+\_\+source\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+class\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+class\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+repch\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+repch\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+source\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+source\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+style\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+style\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+text\+\_\+source\+\_\+get(), edje\+\_\+edit\+\_\+state\+\_\+text\+\_\+text\+\_\+source\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+tweens\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+style\+\_\+add(), edje\+\_\+edit\+\_\+style\+\_\+tag\+\_\+add(), edje\+\_\+edit\+\_\+style\+\_\+tag\+\_\+name\+\_\+set(), edje\+\_\+edit\+\_\+style\+\_\+tag\+\_\+value\+\_\+get(), edje\+\_\+edit\+\_\+style\+\_\+tag\+\_\+value\+\_\+set(), edje\+\_\+edit\+\_\+style\+\_\+tags\+\_\+list\+\_\+get(), edje\+\_\+edit\+\_\+styles\+\_\+list\+\_\+get(), edje\+\_\+mmap\+\_\+collection\+\_\+list(), edje\+\_\+text\+\_\+class\+\_\+set(), eet\+\_\+alias\+\_\+get(), eet\+\_\+eina\+\_\+stream\+\_\+data\+\_\+descriptor\+\_\+class\+\_\+set(), eet\+\_\+mmap(), eet\+\_\+node\+\_\+hash\+\_\+new(), eet\+\_\+node\+\_\+list\+\_\+append(), eet\+\_\+node\+\_\+struct\+\_\+append(), eeze\+\_\+disk\+\_\+mount\+\_\+point\+\_\+get(), eeze\+\_\+disk\+\_\+new(), eeze\+\_\+disk\+\_\+new\+\_\+from\+\_\+mount(), eeze\+\_\+disk\+\_\+udev\+\_\+get\+\_\+parent(), eeze\+\_\+disk\+\_\+udev\+\_\+get\+\_\+property(), eeze\+\_\+disk\+\_\+udev\+\_\+get\+\_\+sysattr(), eeze\+\_\+disk\+\_\+udev\+\_\+walk\+\_\+get\+\_\+sysattr(), eeze\+\_\+net\+\_\+new(), eeze\+\_\+udev\+\_\+devpath\+\_\+get\+\_\+syspath(), eeze\+\_\+udev\+\_\+find\+\_\+by\+\_\+filter(), eeze\+\_\+udev\+\_\+find\+\_\+by\+\_\+sysattr(), eeze\+\_\+udev\+\_\+find\+\_\+by\+\_\+type(), eeze\+\_\+udev\+\_\+find\+\_\+similar\+\_\+from\+\_\+syspath(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+devname(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+devpath(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+parent(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+parent\+\_\+filtered(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+parents(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+property(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+subsystem(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+sysattr(), eeze\+\_\+udev\+\_\+syspath\+\_\+get\+\_\+sysattr\+\_\+list(), eeze\+\_\+udev\+\_\+walk\+\_\+get\+\_\+sysattr(), efreet\+\_\+desktop\+\_\+category\+\_\+add(), efreet\+\_\+desktop\+\_\+string\+\_\+list\+\_\+parse(), efreet\+\_\+desktop\+\_\+type\+\_\+add(), efreet\+\_\+desktop\+\_\+x\+\_\+field\+\_\+get(), efreet\+\_\+desktop\+\_\+x\+\_\+field\+\_\+set(), efreet\+\_\+icon\+\_\+extension\+\_\+add(), efreet\+\_\+menu\+\_\+async\+\_\+parse(), efreet\+\_\+menu\+\_\+desktop\+\_\+insert(), efreet\+\_\+menu\+\_\+file\+\_\+set(), efreet\+\_\+menu\+\_\+kde\+\_\+legacy\+\_\+init(), efreet\+\_\+menu\+\_\+new(), efreet\+\_\+mime\+\_\+type\+\_\+icon\+\_\+get(), efreet\+\_\+trash\+\_\+dir\+\_\+get(), efreet\+\_\+uri\+\_\+decode(), efreet\+\_\+uri\+\_\+encode(), efreet\+\_\+util\+\_\+path\+\_\+to\+\_\+file\+\_\+id(), eina\+\_\+error\+\_\+msg\+\_\+modify(), eina\+\_\+error\+\_\+msg\+\_\+register(), eina\+\_\+simple\+\_\+xml\+\_\+attribute\+\_\+new(), eina\+\_\+simple\+\_\+xml\+\_\+node\+\_\+tag\+\_\+new(), eina\+\_\+xattr\+\_\+value\+\_\+ls(), eio\+\_\+dir\+\_\+copy(), eio\+\_\+dir\+\_\+direct\+\_\+ls(), eio\+\_\+dir\+\_\+move(), eio\+\_\+dir\+\_\+stat\+\_\+ls(), eio\+\_\+dir\+\_\+unlink(), eio\+\_\+eet\+\_\+data\+\_\+image\+\_\+write\+\_\+cipher(), eio\+\_\+eet\+\_\+data\+\_\+read\+\_\+cipher(), eio\+\_\+eet\+\_\+data\+\_\+write\+\_\+cipher(), eio\+\_\+eet\+\_\+open(), eio\+\_\+eet\+\_\+read\+\_\+cipher(), eio\+\_\+eet\+\_\+read\+\_\+direct(), eio\+\_\+eet\+\_\+write\+\_\+cipher(), eio\+\_\+file\+\_\+chmod(), eio\+\_\+file\+\_\+chown(), eio\+\_\+file\+\_\+copy(), eio\+\_\+file\+\_\+direct\+\_\+ls(), eio\+\_\+file\+\_\+direct\+\_\+stat(), eio\+\_\+file\+\_\+ls(), eio\+\_\+file\+\_\+mkdir(), eio\+\_\+file\+\_\+move(), eio\+\_\+file\+\_\+open(), eio\+\_\+file\+\_\+stat\+\_\+ls(), eio\+\_\+file\+\_\+unlink(), eio\+\_\+file\+\_\+xattr(), eio\+\_\+monitor\+\_\+add(), eldbus\+\_\+object\+\_\+get(), eldbus\+\_\+proxy\+\_\+get(), eldbus\+\_\+signal\+\_\+handler\+\_\+match\+\_\+extra\+\_\+vset(), emotion\+\_\+object\+\_\+extension\+\_\+may\+\_\+play\+\_\+get(), ethumb\+\_\+init(), evas\+\_\+font\+\_\+path\+\_\+global\+\_\+append(), evas\+\_\+font\+\_\+path\+\_\+global\+\_\+prepend(), evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get(), and efl\+::eina\+::stringshare\+::stringshare().

\hypertarget{group__Eina__Stringshare__Group_ga7f45007b1b76bc15fac0f26ae4a6bb77}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+printf@{eina\+\_\+stringshare\+\_\+printf}}
\index{eina\+\_\+stringshare\+\_\+printf@{eina\+\_\+stringshare\+\_\+printf}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+printf}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare}$\ast$ eina\+\_\+stringshare\+\_\+printf (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{fmt, }
\item[{}]{...}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_ga7f45007b1b76bc15fac0f26ae4a6bb77}


Retrieve an instance of a string for use in a program from a format string. 


\begin{DoxyParams}{Parameters}
{\em fmt} & The N\+U\+L\+L-\/terminated format string to retrieve an instance of. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to an instance of the string on success. {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
This function retrieves an instance of {\ttfamily fmt}. If {\ttfamily fmt} is {\ttfamily N\+U\+L\+L}, then {\ttfamily N\+U\+L\+L} is returned. If {\ttfamily fmt} is already stored, it is just returned and its reference counter is increased. Otherwise a duplicated string is returned.

The format string {\ttfamily fmt} must be N\+U\+L\+L-\/terminated ('\textbackslash{}0') and its full length will be used. To use part of the format string or non-\/null terminated, use \hyperlink{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}{eina\+\_\+stringshare\+\_\+nprintf()} instead.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}{eina\+\_\+stringshare\+\_\+nprintf()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_stringshare_01_8c-example}{eina\+\_\+stringshare\+\_\+01.\+c}.\end{Desc}
\hypertarget{group__Eina__Stringshare__Group_gad111348c41fa3a868e6e152bf1afa688}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+vprintf@{eina\+\_\+stringshare\+\_\+vprintf}}
\index{eina\+\_\+stringshare\+\_\+vprintf@{eina\+\_\+stringshare\+\_\+vprintf}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+vprintf}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare} {\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare}$\ast$ eina\+\_\+stringshare\+\_\+vprintf (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{fmt, }
\item[{va\+\_\+list}]{args}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_gad111348c41fa3a868e6e152bf1afa688}


Retrieve an instance of a string for use in a program from a format string. 


\begin{DoxyParams}{Parameters}
{\em fmt} & The N\+U\+L\+L-\/terminated format string to retrieve an instance of. \\
\hline
{\em args} & The va\+\_\+args for {\ttfamily fmt} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to an instance of the string on success. {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
This function retrieves an instance of {\ttfamily fmt} with {\ttfamily args}. If {\ttfamily fmt} is {\ttfamily N\+U\+L\+L}, then {\ttfamily N\+U\+L\+L} is returned. If {\ttfamily fmt} with {\ttfamily args} is already stored, it is just returned and its reference counter is increased. Otherwise a duplicated string is returned.

The format string {\ttfamily fmt} must be N\+U\+L\+L-\/terminated ('\textbackslash{}0') and its full length will be used. To use part of the format string or non-\/null terminated, use \hyperlink{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}{eina\+\_\+stringshare\+\_\+nprintf()} instead.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}{eina\+\_\+stringshare\+\_\+nprintf()} 
\end{DoxySeeAlso}


References eina\+\_\+stringshare\+\_\+add\+\_\+length().

\hypertarget{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+nprintf@{eina\+\_\+stringshare\+\_\+nprintf}}
\index{eina\+\_\+stringshare\+\_\+nprintf@{eina\+\_\+stringshare\+\_\+nprintf}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+nprintf}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare}$\ast$ eina\+\_\+stringshare\+\_\+nprintf (
\begin{DoxyParamCaption}
\item[{unsigned int}]{len, }
\item[{const char $\ast$}]{fmt, }
\item[{}]{...}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}


Retrieve an instance of a string for use in a program from a format string with size limitation. 


\begin{DoxyParams}{Parameters}
{\em len} & The length of the format string to use \\
\hline
{\em fmt} & The format string to retrieve an instance of. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to an instance of the string on success. {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
This function retrieves an instance of {\ttfamily fmt} limited by {\ttfamily len}. If {\ttfamily fmt} is {\ttfamily N\+U\+L\+L} or {\ttfamily len} is $<$ 1, then {\ttfamily N\+U\+L\+L} is returned. If the resulting string is already stored, it is returned and its reference counter is increased. Otherwise a duplicated string is returned.

{\ttfamily len} length of the format string will be used. To use the entire format string, use \hyperlink{group__Eina__Stringshare__Group_ga7f45007b1b76bc15fac0f26ae4a6bb77}{eina\+\_\+stringshare\+\_\+printf()} instead.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Stringshare__Group_ga7f45007b1b76bc15fac0f26ae4a6bb77}{eina\+\_\+stringshare\+\_\+printf()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_stringshare_01_8c-example}{eina\+\_\+stringshare\+\_\+01.\+c}.\end{Desc}
\hypertarget{group__Eina__Stringshare__Group_ga4e18c53f96ce4eaa82c5e5dc94e575d5}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+ref@{eina\+\_\+stringshare\+\_\+ref}}
\index{eina\+\_\+stringshare\+\_\+ref@{eina\+\_\+stringshare\+\_\+ref}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+ref}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare} {\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Stringshare}$\ast$ eina\+\_\+stringshare\+\_\+ref (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Stringshare} $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_ga4e18c53f96ce4eaa82c5e5dc94e575d5}


Increment references of the given shared string. 


\begin{DoxyParams}{Parameters}
{\em str} & The shared string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to an instance of the string on success. {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
This is similar to eina\+\_\+share\+\_\+common\+\_\+add(), but it's faster since it will avoid lookups if possible, but on the down side it requires the parameter to be shared string. In other words, it must be the return of a previous call to one of the stringshare functions.

There is no unref since this is the work of eina\+\_\+share\+\_\+common\+\_\+del(). 

References eina\+\_\+spinlock\+\_\+release(), and eina\+\_\+spinlock\+\_\+take().



Referenced by efreet\+\_\+trash\+\_\+dir\+\_\+get(), eio\+\_\+monitor\+\_\+stringshared\+\_\+add(), ethumb\+\_\+client\+\_\+thumb\+\_\+exists(), and ethumb\+\_\+dup().

\hypertarget{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+del@{eina\+\_\+stringshare\+\_\+del}}
\index{eina\+\_\+stringshare\+\_\+del@{eina\+\_\+stringshare\+\_\+del}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+del}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void eina\+\_\+stringshare\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Stringshare} $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}


Note that the given string has lost an instance. 


\begin{DoxyParams}{Parameters}
{\em str} & string The given string.\\
\hline
\end{DoxyParams}
This function decreases the reference counter associated to {\ttfamily str} if it exists. If that counter reaches 0, the memory associated to {\ttfamily str} is freed. If {\ttfamily str} is {\ttfamily N\+U\+L\+L}, the function returns immediately.

\begin{DoxyNote}{Note}
If the given pointer is not shared, bad things will happen, likely a segmentation fault. 
\end{DoxyNote}


References eina\+\_\+spinlock\+\_\+release(), and eina\+\_\+spinlock\+\_\+take().



Referenced by ecore\+\_\+drm\+\_\+device\+\_\+find(), ecore\+\_\+drm\+\_\+device\+\_\+free(), ecore\+\_\+drm\+\_\+tty\+\_\+close(), ecore\+\_\+evas\+\_\+aux\+\_\+hint\+\_\+add(), ecore\+\_\+evas\+\_\+aux\+\_\+hint\+\_\+del(), ecore\+\_\+evas\+\_\+aux\+\_\+hint\+\_\+val\+\_\+set(), ecore\+\_\+wl\+\_\+window\+\_\+free(), edje\+\_\+available\+\_\+modules\+\_\+get(), edje\+\_\+color\+\_\+class\+\_\+del(), edje\+\_\+edit\+\_\+data\+\_\+add(), edje\+\_\+edit\+\_\+font\+\_\+add(), edje\+\_\+edit\+\_\+group\+\_\+data\+\_\+add(), edje\+\_\+edit\+\_\+image\+\_\+add(), edje\+\_\+edit\+\_\+image\+\_\+usage\+\_\+list\+\_\+free(), edje\+\_\+edit\+\_\+limits\+\_\+list\+\_\+free(), edje\+\_\+edit\+\_\+state\+\_\+external\+\_\+param\+\_\+set(), edje\+\_\+edit\+\_\+string\+\_\+free(), edje\+\_\+edit\+\_\+string\+\_\+list\+\_\+free(), edje\+\_\+file\+\_\+collection\+\_\+list\+\_\+free(), edje\+\_\+text\+\_\+class\+\_\+del(), eet\+\_\+eina\+\_\+stream\+\_\+data\+\_\+descriptor\+\_\+class\+\_\+set(), eet\+\_\+node\+\_\+del(), eet\+\_\+node\+\_\+list\+\_\+append(), eet\+\_\+node\+\_\+struct\+\_\+append(), eeze\+\_\+disk\+\_\+mount(), eeze\+\_\+disk\+\_\+mount\+\_\+wrapper\+\_\+set(), eeze\+\_\+disk\+\_\+new(), eeze\+\_\+disk\+\_\+new\+\_\+from\+\_\+mount(), eeze\+\_\+disk\+\_\+removable\+\_\+get(), eeze\+\_\+disk\+\_\+scan(), eeze\+\_\+net\+\_\+free(), efreet\+\_\+desktop\+\_\+category\+\_\+del(), efreet\+\_\+desktop\+\_\+free(), efreet\+\_\+desktop\+\_\+x\+\_\+field\+\_\+set(), efreet\+\_\+icon\+\_\+extension\+\_\+add(), efreet\+\_\+menu\+\_\+kde\+\_\+legacy\+\_\+init(), efreet\+\_\+mime\+\_\+type\+\_\+icon\+\_\+get(), efreet\+\_\+trash\+\_\+delete\+\_\+uri(), efreet\+\_\+trash\+\_\+dir\+\_\+get(), efreet\+\_\+util\+\_\+path\+\_\+to\+\_\+file\+\_\+id(), eina\+\_\+error\+\_\+msg\+\_\+modify(), eina\+\_\+simple\+\_\+xml\+\_\+attribute\+\_\+free(), eio\+\_\+monitor\+\_\+add(), eldbus\+\_\+object\+\_\+get(), eldbus\+\_\+proxy\+\_\+get(), emotion\+\_\+object\+\_\+extension\+\_\+may\+\_\+play\+\_\+get(), ethumb\+\_\+client\+\_\+generate\+\_\+cancel(), ethumb\+\_\+client\+\_\+generate\+\_\+cancel\+\_\+all(), ethumb\+\_\+client\+\_\+thumb\+\_\+exists(), ethumb\+\_\+free(), ethumb\+\_\+shutdown(), evas\+\_\+font\+\_\+path\+\_\+global\+\_\+clear(), evas\+\_\+object\+\_\+image\+\_\+extension\+\_\+can\+\_\+load\+\_\+get(), evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free(), and efl\+::eina\+::stringshare\+::$\sim$stringshare().

\hypertarget{group__Eina__Stringshare__Group_ga55b2653599f130044d88e7b854235c2a}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+strlen@{eina\+\_\+stringshare\+\_\+strlen}}
\index{eina\+\_\+stringshare\+\_\+strlen@{eina\+\_\+stringshare\+\_\+strlen}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+strlen}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} int eina\+\_\+stringshare\+\_\+strlen (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Stringshare} $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_ga55b2653599f130044d88e7b854235c2a}


Note that the given string {\bfseries must} be shared. 


\begin{DoxyParams}{Parameters}
{\em str} & the shared string to know the length. It is safe to give {\ttfamily N\+U\+L\+L}, in that case {\ttfamily 0} is returned. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The length of a shared string.
\end{DoxyReturn}
This function is a cheap way to known the length of a shared string.

\begin{DoxyNote}{Note}
If the given pointer is not shared, bad things will happen, likely a segmentation fault. If in doubt, try strlen(). 
\end{DoxyNote}


Referenced by efl\+::eina\+::stringshare\+::size().

\hypertarget{group__Eina__Stringshare__Group_gae3500379815105ff0759aabd95cea5d7}{\index{Stringshare@{Stringshare}!eina\+\_\+stringshare\+\_\+dump@{eina\+\_\+stringshare\+\_\+dump}}
\index{eina\+\_\+stringshare\+\_\+dump@{eina\+\_\+stringshare\+\_\+dump}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+stringshare\+\_\+dump}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void eina\+\_\+stringshare\+\_\+dump (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_gae3500379815105ff0759aabd95cea5d7}


Dump the contents of the share\+\_\+common. 

This function dumps all strings in the share\+\_\+common to stdout with a D\+D\+D\+: prefix per line and a memory usage summary. \hypertarget{group__Eina__Stringshare__Group_gadb653e2dd0baf58b7f8bb7eea1753b2b}{\index{Stringshare@{Stringshare}!eina\+\_\+tmpstr\+\_\+add@{eina\+\_\+tmpstr\+\_\+add}}
\index{eina\+\_\+tmpstr\+\_\+add@{eina\+\_\+tmpstr\+\_\+add}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+tmpstr\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Tmpstr}$\ast$ eina\+\_\+tmpstr\+\_\+add (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_gadb653e2dd0baf58b7f8bb7eea1753b2b}


Add a new temporary string based on the input string. 


\begin{DoxyParams}{Parameters}
{\em str} & This is the input stringthat is copied into the temp string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the tmp string that is a standard C string.
\end{DoxyReturn}
When you add a temporary string (tmpstr) it is expected to have a very short lifespan, and at any one time only a few of these are intended to exist. This is not intended for longer term storage of strings. The intended use is the ability to safely pass strings as return values from functions directly into parameters of new functions and then have the string be cleaned up automatically by the caller.

If {\ttfamily str} is N\+U\+L\+L, or no memory space exists to store the tmpstr, then N\+U\+L\+L will be returned, otherwise a valid string pointer will be returned that you can treat as any other C string (eg strdup(tmpstr) or printf(\char`\"{}\%s\textbackslash{}n\char`\"{}, tmpstr) etc.). This string should be considered read-\/only and immutable, and when youa re done with the string yo should delete it with \hyperlink{group__Eina__Stringshare__Group_gaa84ec3cc6c63bc67355aa3cbaa26189f}{eina\+\_\+tmpstr\+\_\+del()}.

Example usage\+:


\begin{DoxyCode}
1 Eina\_Tmpstr *my\_homedir(void) \{
2   return eina\_tmpstr\_add(getenv("HOME"));
3 \}
4 
5 void my\_rmfile(Eina\_Tmpstr *str) \{
6   if (!str) return;
7   unlink(str);
8   eina\_tmpstr\_del(str);
9 \}
10 
11 my\_rmfile(my\_homedir());
12 my\_rmfile("/tmp/file");
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Stringshare__Group_gaa84ec3cc6c63bc67355aa3cbaa26189f}{eina\+\_\+tmpstr\+\_\+del()} 

\hyperlink{group__Eina__Stringshare__Group_ga6fb1f760eedc7796dc99247e51c6cba2}{eina\+\_\+tmpstr\+\_\+add\+\_\+length()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+8.\+0 
\end{DoxySince}


References eina\+\_\+tmpstr\+\_\+add\+\_\+length().



Referenced by eina\+\_\+file\+\_\+mkdtemp(), and eina\+\_\+file\+\_\+mkstemp().

\hypertarget{group__Eina__Stringshare__Group_ga6fb1f760eedc7796dc99247e51c6cba2}{\index{Stringshare@{Stringshare}!eina\+\_\+tmpstr\+\_\+add\+\_\+length@{eina\+\_\+tmpstr\+\_\+add\+\_\+length}}
\index{eina\+\_\+tmpstr\+\_\+add\+\_\+length@{eina\+\_\+tmpstr\+\_\+add\+\_\+length}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+tmpstr\+\_\+add\+\_\+length}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} {\bf Eina\+\_\+\+Tmpstr}$\ast$ eina\+\_\+tmpstr\+\_\+add\+\_\+length (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{size\+\_\+t}]{length}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_ga6fb1f760eedc7796dc99247e51c6cba2}


Add a new temporary string based on the input string and length. 


\begin{DoxyParams}{Parameters}
{\em str} & This is the input stringthat is copied into the temp string. \\
\hline
{\em length} & This is the maximum length and the allocated length of the temp string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the tmp string that is a standard C string.
\end{DoxyReturn}
When you add a temporary string (tmpstr) it is expected to have a very short lifespan, and at any one time only a few of these are intended to exist. This is not intended for longer term storage of strings. The intended use is the ability to safely pass strings as return values from functions directly into parameters of new functions and then have the string be cleaned up automatically by the caller.

If {\ttfamily str} is N\+U\+L\+L, or no memory space exists to store the tmpstr, then N\+U\+L\+L will be returned, otherwise a valid string pointer will be returned that you can treat as any other C string (eg strdup(tmpstr) or printf(\char`\"{}\%s\textbackslash{}n\char`\"{}, tmpstr) etc.). This string should be considered read-\/only and immutable, and when youa re done with the string yo should delete it with \hyperlink{group__Eina__Stringshare__Group_gaa84ec3cc6c63bc67355aa3cbaa26189f}{eina\+\_\+tmpstr\+\_\+del()}.

\begin{DoxyNote}{Note}
If the length is greater than the actual string, but still '\textbackslash{}0' terminateed. Their won't be any crash and the string will be correct, but eina\+\_\+tmpstr\+\_\+strlen will return an erroneous length. So if you want to have the correct length always call eina\+\_\+tmpstr\+\_\+add\+\_\+length with length == strlen(str). 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Stringshare__Group_gaa84ec3cc6c63bc67355aa3cbaa26189f}{eina\+\_\+tmpstr\+\_\+del()} 

\hyperlink{group__Eina__Stringshare__Group_gadb653e2dd0baf58b7f8bb7eea1753b2b}{eina\+\_\+tmpstr\+\_\+add()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+8.\+0 
\end{DoxySince}


References eina\+\_\+lock\+\_\+release(), and eina\+\_\+lock\+\_\+take().



Referenced by eina\+\_\+file\+\_\+current\+\_\+directory\+\_\+get(), and eina\+\_\+tmpstr\+\_\+add().

\hypertarget{group__Eina__Stringshare__Group_gad62b594b32ef8546764915bdcbd866fa}{\index{Stringshare@{Stringshare}!eina\+\_\+tmpstr\+\_\+strlen@{eina\+\_\+tmpstr\+\_\+strlen}}
\index{eina\+\_\+tmpstr\+\_\+strlen@{eina\+\_\+tmpstr\+\_\+strlen}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+tmpstr\+\_\+strlen}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} size\+\_\+t eina\+\_\+tmpstr\+\_\+strlen (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Tmpstr} $\ast$}]{tmpstr}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_gad62b594b32ef8546764915bdcbd866fa}


Return the length of a temporary string including the '\textbackslash{}0'. 


\begin{DoxyParams}{Parameters}
{\em tmpstr} & This is any C string pointer, but if it is a tmp string it will return the length faster. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The length of the string including the '\textbackslash{}0';
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+8.\+0 
\end{DoxySince}


References eina\+\_\+lock\+\_\+release(), and eina\+\_\+lock\+\_\+take().



Referenced by eina\+\_\+file\+\_\+path\+\_\+sanitize().

\hypertarget{group__Eina__Stringshare__Group_gaa84ec3cc6c63bc67355aa3cbaa26189f}{\index{Stringshare@{Stringshare}!eina\+\_\+tmpstr\+\_\+del@{eina\+\_\+tmpstr\+\_\+del}}
\index{eina\+\_\+tmpstr\+\_\+del@{eina\+\_\+tmpstr\+\_\+del}!Stringshare@{Stringshare}}
\subsubsection[{eina\+\_\+tmpstr\+\_\+del}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\+A\+P\+I} void eina\+\_\+tmpstr\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+Tmpstr} $\ast$}]{tmpstr}
\end{DoxyParamCaption}
)}}\label{group__Eina__Stringshare__Group_gaa84ec3cc6c63bc67355aa3cbaa26189f}


Delete the temporary string if it is one, or ignore it if it is not. 


\begin{DoxyParams}{Parameters}
{\em tmpstr} & This is any C string pointer, but if it is a tmp string it is freed.\\
\hline
\end{DoxyParams}
This will delete the given temporary string {\ttfamily tmpstr} if it is a valid temporary string, or otherwise it will ignore it and do nothing so this can be used safely with non-\/temporary strings.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Stringshare__Group_gadb653e2dd0baf58b7f8bb7eea1753b2b}{eina\+\_\+tmpstr\+\_\+add()}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+8.\+0 
\end{DoxySince}


References eina\+\_\+lock\+\_\+release(), and eina\+\_\+lock\+\_\+take().



Referenced by eina\+\_\+file\+\_\+cleanup().

