ds: string: add function to copy string data from a b_stringstream
unlike b_stringstream_ptr(), this function supports copying strings that contain null bytes.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <blue/core/iterator.h>
|
||||
#include <blue/core/macros.h>
|
||||
#include <blue/core/status.h>
|
||||
#include <blue/core/stringstream.h>
|
||||
#include <ctype.h>
|
||||
|
||||
B_DECLS_BEGIN;
|
||||
@@ -70,6 +71,8 @@ BLUE_API b_status b_string_reserve(b_string *str, size_t capacity);
|
||||
BLUE_API b_status b_string_replace(
|
||||
b_string *str, size_t start, size_t length, const char *new_data);
|
||||
BLUE_API b_status b_string_replace_all(b_string *str, const char *new_data);
|
||||
BLUE_API b_status b_string_replace_all_with_stringstream(
|
||||
b_string *str, const b_stringstream *new_data);
|
||||
BLUE_API b_status b_string_remove(b_string *str, size_t start, size_t length);
|
||||
BLUE_API b_status b_string_transform(b_string *str, int (*transformer)(int));
|
||||
BLUE_API b_status b_string_trim(b_string *str);
|
||||
|
||||
Reference in New Issue
Block a user