
\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -g eina\_stringshare\_01.c -o eina\_stringshare\_01 `pkg-config --cflags --libs eina`}

\textcolor{preprocessor}{#include <stdio.h>}
\textcolor{preprocessor}{#include <\hyperlink{Eina_8h}{Eina.h}>}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{int} argc EINA\_UNUSED, \textcolor{keywordtype}{char} **argv EINA\_UNUSED)
\{
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *str, *str2;
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prologe = \textcolor{stringliteral}{"The Cylons were created by man. They rebelled. They "}
                         \textcolor{stringliteral}{"evolved."};
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prologe2 = \textcolor{stringliteral}{"%d Cylon models. %d are known. %d live in secret. "}
                          \textcolor{stringliteral}{"%d will be revealed."};
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prologe3 = \textcolor{stringliteral}{"There are many copies. And they have a plan."};

   \hyperlink{group__Eina__Main__Group_gabf448ada5bc81a07342b66c6f818ee5e}{eina\_init}();

   str = \hyperlink{group__Eina__Stringshare__Group_ga7102630f25d779cd216e48f1369f65b1}{eina\_stringshare\_add\_length}(prologe, 31);
   printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, str);
   printf(\textcolor{stringliteral}{"length: %d\(\backslash\)n"}, \hyperlink{group__Eina__Stringshare__Group_ga55b2653599f130044d88e7b854235c2a}{eina\_stringshare\_strlen}(str));
   \hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\_stringshare\_del}(str);

   str = \hyperlink{group__Eina__Stringshare__Group_ga7f45007b1b76bc15fac0f26ae4a6bb77}{eina\_stringshare\_printf}(prologe2, 12, 7, 4, 1);
   printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, str);
   \hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\_stringshare\_del}(str);

   str = \hyperlink{group__Eina__Stringshare__Group_ga4f24bef16c2eb9ab25ae6e40cefd73e5}{eina\_stringshare\_nprintf}(45, \textcolor{stringliteral}{"%s"}, prologe3);
   printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, str);
   str2 = \hyperlink{group__Eina__Stringshare__Group_gac7a3f073cafb7af63b2c7cc2eabd1c1f}{eina\_stringshare\_add}(prologe3);
   printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, str2);
   \hyperlink{group__Eina__Stringshare__Group_ga4e18c53f96ce4eaa82c5e5dc94e575d5}{eina\_stringshare\_ref}(str2);
   \hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\_stringshare\_del}(str2);
   printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, str2);

   eina\_stringshare\_replace(&str, prologe);
   printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, str);

   \hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\_stringshare\_del}(str);
   \hyperlink{group__Eina__Stringshare__Group_ga4453d2aff2b325c7b45048f30df9b1f5}{eina\_stringshare\_del}(str2);

   \hyperlink{group__Eina__Main__Group_ga6741fcaba116e31e96ce14dcfa03f568}{eina\_shutdown}();

   \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCodeInclude}
 