diff options
| author | 2021-07-21 23:22:32 -0400 | |
|---|---|---|
| committer | 2021-07-21 23:22:32 -0400 | |
| commit | 6363789394373f780760d847dcf1fff28e26522e (patch) | |
| tree | a5aadeda00437737cde34d24b091c51a41240c57 | |
| parent | gb_string.h: add gb_printf (diff) | |
add gb_string_test.c
| -rw-r--r-- | gb_string_test.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gb_string_test.c b/gb_string_test.c new file mode 100644 index 0000000..43ea494 --- /dev/null +++ b/gb_string_test.c @@ -0,0 +1,14 @@ +#define GB_STRING_IMPLEMENTATION +#include <stdarg.h> +#include <stdlib.h> +#include "gb_string.h" +#include <stdio.h> + +int main(void) { + gbString s = gb_make_string("hello"); + s = gb_printf(s, "(%s) %d %d %d %.*s\n", "hello", 12, 94, -1234, 2, "world"); + printf("%s\n", s); + gb_free_string(s); + s = 0; + return 0; +} |
