eina: update example with eina_strbuf_manage_read_only_new_length function.

Summary:
The example is to demonstrate the use of
eina_strbuf_manage_read_only_new_length API.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D3421

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Srivardhan Hebbar 2016-01-04 12:32:15 -08:00 committed by Cedric BAIL
parent 9e117866b8
commit 7078fcb835
1 changed files with 10 additions and 0 deletions

View File

@ -40,6 +40,16 @@ int main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
eina_strbuf_replace_all(buf, "length", "size");
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
buf = eina_strbuf_manage_read_only_new_length("Example string", 14);
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_append_char(buf, '.');
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_append_length(buf, "Another string.", 15);
printf("%s\n", eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
eina_shutdown();