forked from enlightenment/efl
eina: updated example to include eina_strbuf_substr_get.
Summary: Depends on D3224 Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: cedric Differential Revision: https://phab.enlightenment.org/D3226 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
95117bc515
commit
705b08ed74
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf, *substr;
|
||||||
|
|
||||||
eina_init();
|
eina_init();
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
||||||
eina_strbuf_tolower(buf);
|
eina_strbuf_tolower(buf);
|
||||||
printf("%s\n", eina_strbuf_string_get(buf));
|
printf("%s\n", eina_strbuf_string_get(buf));
|
||||||
|
|
||||||
|
substr = eina_strbuf_substr_get(buf, 3, 2);
|
||||||
|
printf("%s\n", eina_strbuf_string_get(substr));
|
||||||
|
eina_strbuf_free(substr);
|
||||||
|
|
||||||
eina_strbuf_insert_escaped(buf, "my ", 0);
|
eina_strbuf_insert_escaped(buf, "my ", 0);
|
||||||
printf("%s\n", eina_strbuf_string_get(buf));
|
printf("%s\n", eina_strbuf_string_get(buf));
|
||||||
eina_strbuf_reset(buf);
|
eina_strbuf_reset(buf);
|
||||||
|
|
Loading…
Reference in New Issue