Allows you to create an owned clone of however many strings that you need, then free all of them at once. More...
#include <furi.h>
Go to the source code of this file.
Data Structures | |
struct | StrBuffer |
StrBuffer instance. More... | |
Functions | |
const char * | str_buffer_make_owned_clone (StrBuffer *buffer, const char *str) |
Makes a owned duplicate of the provided string. | |
void | str_buffer_clear_all_clones (StrBuffer *buffer) |
Clears all owned duplicates. | |
Allows you to create an owned clone of however many strings that you need, then free all of them at once.
Essentially the simplest possible append-only unindexable array of owned C-style strings.
void str_buffer_clear_all_clones | ( | StrBuffer * | buffer | ) |
Clears all owned duplicates.
[in] | buffer | StrBuffer instance |
const char * str_buffer_make_owned_clone | ( | StrBuffer * | buffer, |
const char * | str ) |
Makes a owned duplicate of the provided string.
[in] | buffer | StrBuffer instance |
[in] | str | Input C-style string |
str
becomes invalid