diff options
| author | rajdakin <rajdakin@gmail.com> | 2024-09-20 12:40:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-20 12:40:06 +0200 |
| commit | 550b72200d098607c5be999682b912903c98657a (patch) | |
| tree | f164c1298066035a374a54fc09972c4ab609f902 /wrapperhelper/src/cstring.h | |
| parent | cd9d19a2bb0bbc411c3e32f9ec6b46df0ce5bfb1 (diff) | |
| download | box64-550b72200d098607c5be999682b912903c98657a.tar.gz box64-550b72200d098607c5be999682b912903c98657a.zip | |
Improve the wrapper helper (#1844)
* [WRAPPERHELPER] Fixed some issues, added better macros * [WRAPPERHELPER] Fixed type_t_equal_lax
Diffstat (limited to 'wrapperhelper/src/cstring.h')
| -rw-r--r-- | wrapperhelper/src/cstring.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wrapperhelper/src/cstring.h b/wrapperhelper/src/cstring.h index 15ecd026..fdb0a718 100644 --- a/wrapperhelper/src/cstring.h +++ b/wrapperhelper/src/cstring.h @@ -19,6 +19,7 @@ * string_del ---------- Frees a string. Takes the string. * string_steal -------- Frees a string, keeping the content alive. Takes the string. The content (also returned) needs to be freed separately. * string_add_char ----- Add a character at the end. Takes the string and the new character. May increase the string capacity. + * string_add_char_at -- Add a character at a given index. Takes the string, the new character and the index. May increase the string capacity. * string_add_string --- Add a string at the end in-place. Takes both strings. May increase the string capacity. * string_add_cstr ----- Add a C string at the end in-place. Takes both strings. May increase the string capacity. * string_pop ---------- Pops the last character. Takes the string. May reduce the string capacity. @@ -68,6 +69,7 @@ int string_trim(string_t *s); void string_del(string_t *s); char *string_steal(string_t *s); int string_add_char(string_t *s, char elem); +int string_add_char_at(string_t *s, char elem, size_t idx); int string_add_string(string_t *s1, string_t *s2); int string_add_cstr(string_t *s1, const char *s2); void string_pop(string_t *s); |