Tizen Native API
|
Whenever using eina we need to include it:
In our main function we declare(and initialize) some variables and initialize eina:
It's frequently necessary to split a string into its constituent parts, eina_str_split() make's it easy to do so:
Another common need is to make a string uppercase or lowercase, so let's create a string and make it uppercase and then make it lowercase again:
Next we use eina to check if our names
string starts or ends with some values:
When strings will be used in a terminal(or a number of other places) it necessary to escape certain characters that appear in them:
Much as we previously split a string we will now join two strings:
With strlcpy() we can copy what portion of the prologue
fits in str
and be sure that it's still NULL terminated:
Since we are done with prologue
and str
we should free them:
Finally we see strlcat in action:
And then shut eina down and exit: