--- /dev/null
+//Compile with:
+//gcc -Wall -o eina_strbuf_01 eina_strbuf_01.c `pkg-config --cflags --libs eina`
+
+#include <stdio.h>
+#include <Eina.h>
+
+int main(int argc, char **argv)
+{
+ Eina_Strbuf *buf;
+
+ eina_init();
+
+ buf = eina_strbuf_new();
+
+ eina_strbuf_append_length(buf, "buffe", 5);
+ eina_strbuf_append_char(buf, 'r');
+ printf("%s\n", eina_strbuf_string_get(buf));
+
+ eina_strbuf_insert_escaped(buf, "my ", 0);
+ printf("%s\n", eina_strbuf_string_get(buf));
+ eina_strbuf_reset(buf);
+
+ eina_strbuf_append_escaped(buf, "my buffer");
+ printf("%s\n", eina_strbuf_string_get(buf));
+ eina_strbuf_reset(buf);
+
+ eina_strbuf_append_printf(buf, "%s%c", "buffe", 'r');
+ eina_strbuf_insert_printf(buf, " %s: %d", 6, "length", eina_strbuf_length_get(buf));
+ printf("%s\n", eina_strbuf_string_get(buf));
+
+ eina_strbuf_remove(buf, 0, 7);
+ printf("%s\n", eina_strbuf_string_get(buf));
+
+ eina_strbuf_replace_all(buf, "length", "size");
+ printf("%s\n", eina_strbuf_string_get(buf));
+
+ eina_strbuf_free(buf);
+ eina_shutdown();
+
+ return 0;
+}
#include "eina_types.h"
+
+/**
+ * @page tutorial_strbuf Eina_Strbuf example
+ * @dontinclude eina_strbuf_01.c
+ *
+ * First thing always is including Eina:
+ * @skipline #include
+ * @until #include
+ *
+ * Next we initialize eina and create a string buffer to play with:
+ * @until strbuf_new
+ *
+ * Here you can see two different ways of creating a buffer with the same
+ * contents. We could create them in simpler ways, but this gives us an
+ * oportunity to demonstrate several functions in action:
+ * @until strbuf_reset
+ * @until strbuf_reset
+ *
+ * Next we use the printf family of functions to create a formated string,
+ * add, remove and replace some content:
+ * @until strbuf_string_get
+ * @until strbuf_string_get
+ * @until strbuf_string_get
+ *
+ * Once done we free our string buffer, shut down Eina and end the application:
+ * @until }
+ *
+ * @example eina_strbuf_01.c
+ */
/**
* @addtogroup Eina_String_Buffer_Group String Buffer
*
* The String Buffer data type is designed to be a mutable string,
* allowing to append, prepend or insert a string to a buffer.
*
+ * For more information see @ref tutorial_strbuf "this example".
+ *
* @{
*/