cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=705b08ed745512797ac2ce44c10623f3acf5c2af
commit 705b08ed745512797ac2ce44c10623f3acf5c2af Author: Srivardhan Hebbar <[email protected]> Date: Tue Nov 10 15:04:19 2015 -0800 eina: updated example to include eina_strbuf_substr_get. Summary: Depends on D3224 Signed-off-by: Srivardhan Hebbar <[email protected]> Reviewers: cedric Differential Revision: https://phab.enlightenment.org/D3226 Signed-off-by: Cedric BAIL <[email protected]> --- src/examples/eina/eina_strbuf_01.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/examples/eina/eina_strbuf_01.c b/src/examples/eina/eina_strbuf_01.c index 3f2b9ab..ae265c8 100644 --- a/src/examples/eina/eina_strbuf_01.c +++ b/src/examples/eina/eina_strbuf_01.c @@ -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); --
