| 37 |
37 |
| 38 cxmutstr cx_strdup(AnyStr string); |
38 cxmutstr cx_strdup(AnyStr string); |
| 39 |
39 |
| 40 cxmutstr cx_strdup_a(const CxAllocator *allocator, AnyStr string); |
40 cxmutstr cx_strdup_a(const CxAllocator *allocator, AnyStr string); |
| 41 |
41 |
| 42 int cx_strcpy(cxmutstr *dest, cxstring source); |
42 int cx_strcpy(cxmutstr *dest, AnyStr source); |
| 43 |
43 |
| 44 int cx_strcpy_a(const CxAllocator *allocator, |
44 int cx_strcpy_a(const CxAllocator *allocator, |
| 45 cxmutstr *dest, cxstring source); |
45 cxmutstr *dest, AnyStr source); |
| 46 |
46 |
| 47 void cx_strfree(cxmutstr *str); |
47 void cx_strfree(cxmutstr *str); |
| 48 |
48 |
| 49 void cx_strfree_a(const CxAllocator *alloc, cxmutstr *str); |
49 void cx_strfree_a(const CxAllocator *alloc, cxmutstr *str); |
| 50 |
50 |
| 129 cxmutstr str, size_t count, ... ); |
129 cxmutstr str, size_t count, ... ); |
| 130 |
130 |
| 131 size_t cx_strlen(size_t count, ...); |
131 size_t cx_strlen(size_t count, ...); |
| 132 ``` |
132 ``` |
| 133 |
133 |
| 134 The `cx_strcat_a()` function takes `count` UCX strings, |
134 The `cx_strcat_a()` function takes `count` UCX strings (`cxstring` or `cxmutstr`), |
| 135 allocates memory for a concatenation of those strings _with a single allocation_, |
135 allocates memory for a concatenation of those strings _with a single allocation_, |
| 136 and copies the contents of the strings to the new memory. |
136 and copies the contents of the strings to the new memory. |
| 137 `cx_strcat()` is equivalent, except that it uses the [default allocator](allocator.h.md#default-allocator). |
137 `cx_strcat()` is equivalent, except that it uses the [default allocator](allocator.h.md#default-allocator). |
| 138 |
138 |
| 139 The `cx_strcat_ma()` and `cx_strcat_m()` append the `count` strings to the specified string `str` and, |
139 The `cx_strcat_ma()` and `cx_strcat_m()` append the `count` strings to the specified string `str` and, |