test: update b_stream usage
This commit is contained in:
@@ -28,10 +28,13 @@ int main(void)
|
||||
|
||||
b_string_unref(str);
|
||||
|
||||
b_stringstream strv;
|
||||
b_stringstream_begin_dynamic(&strv);
|
||||
b_stringstream_add_many(&strv, "Hello", ", world", "!", NULL);
|
||||
char *s = b_stringstream_end(&strv);
|
||||
b_stringstream *strv = b_stringstream_create();
|
||||
b_stream_write_string(strv, "Hello", NULL);
|
||||
b_stream_write_string(strv, ", world", NULL);
|
||||
b_stream_write_string(strv, "!", NULL);
|
||||
|
||||
char *s = b_stringstream_steal(strv);
|
||||
b_stringstream_unref(strv);
|
||||
|
||||
printf("%s\n", s);
|
||||
free(s);
|
||||
|
||||
Reference in New Issue
Block a user