diff options
| author | Tyge Lovset <[email protected]> | 2022-05-06 05:44:41 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2022-05-06 05:44:41 +0200 |
| commit | bf3a35e3cd8d1df9548aa0e57b58d7a0e5dfef14 (patch) | |
| tree | d7fa178e449f64c0d91d3d4b97e20a5619fccab3 /docs/cstr_api.md | |
| parent | 85180f17da3ea3d1cebc30d42560fb12a997aabf (diff) | |
| download | STC-modified-bf3a35e3cd8d1df9548aa0e57b58d7a0e5dfef14.tar.gz STC-modified-bf3a35e3cd8d1df9548aa0e57b58d7a0e5dfef14.zip | |
Made cstr_buffer() func. public, and docs for cstr_sv() - convert to csview.
Diffstat (limited to 'docs/cstr_api.md')
| -rw-r--r-- | docs/cstr_api.md | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/cstr_api.md b/docs/cstr_api.md index 2e8cde33..66a604a0 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -31,6 +31,9 @@ void cstr_drop(cstr *self); // destruc const char* cstr_str(const cstr* self); // access to const char* char* cstr_data(cstr* self); // access to char* +csview cstr_sv(const cstr* self); // access to string view +cstr_buf cstr_buffer(cstr* self); // access to mutable buffer (with capacity) + size_t cstr_size(cstr s); size_t cstr_length(cstr s); size_t cstr_capacity(cstr s); @@ -94,10 +97,12 @@ int c_strncasecmp(const char* str1, const char* str2, size_t n); ## Types -| Type name | Type definition | Used to represent... | -|:----------------|:-------------------------------|:-------------------------| -| `cstr` | `struct { char *str; }` | The string type | -| `cstr_value` | `char` | The string element type | +| Type name | Type definition | Used to represent... | +|:----------------|:-------------------------------------------|:---------------------| +| `cstr` | `struct { ... }` | The string type | +| `cstr_value` | `char` | String element type | +| `csview` | `struct { const char *str; size_t size; }` | String view type | +| `cstr_buf` | `struct { char *data; size_t size, cap; }` | String buffer type | ## Constants and macros |
