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:
Srivardhan Hebbar 2015-11-10 15:04:19 -08:00 committed by Cedric BAIL
parent 95117bc515
commit 705b08ed74
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,7 @@
int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
Eina_Strbuf *buf;
Eina_Strbuf *buf, *substr;
eina_init();
@ -19,6 +19,10 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
eina_strbuf_tolower(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);
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_reset(buf);