aboutsummaryrefslogtreecommitdiffstats
path: root/gb_string_test.c
blob: d326abcda86bef5676778ff1b7d15ce3bc976ebd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
   This software is in the public domain. Where that dedication is not
   recognized, you are granted a perpetual, irrevocable license to copy,
   distribute, and modify this file as you see fit.
*/

#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;
}