forked from enlightenment/efl
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:
parent
2c9131ac66
commit
8c6adac0a5
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue