diff options
| author | tylov <[email protected]> | 2023-08-17 11:40:58 +0200 |
|---|---|---|
| committer | tylov <[email protected]> | 2023-08-17 11:40:58 +0200 |
| commit | 032bf0a0dfe8b5d368118d4da5862323a021b626 (patch) | |
| tree | abed3c05a89dd59d467ce10ecfe181bc240b1483 | |
| parent | 311f12d7005351ca245aa1df77889d8db4899862 (diff) | |
| download | STC-modified-032bf0a0dfe8b5d368118d4da5862323a021b626.tar.gz STC-modified-032bf0a0dfe8b5d368118d4da5862323a021b626.zip | |
Corrected/updated string types in docs.
| -rw-r--r-- | docs/crawstr_api.md | 10 | ||||
| -rw-r--r-- | docs/cstr_api.md | 2 | ||||
| -rw-r--r-- | docs/csview_api.md | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/docs/crawstr_api.md b/docs/crawstr_api.md index 7d663a04..b63e532f 100644 --- a/docs/crawstr_api.md +++ b/docs/crawstr_api.md @@ -67,11 +67,11 @@ uint32_t utf8_peek_off(const char* s, int offset); // codep ## Types -| Type name | Type definition | Used to represent... | -|:----------------|:-------------------------------------------|:-------------------------| -| `crawstr` | `struct { const char *str; intptr_t size; }` | Raw string view type | -| `crawstr_value` | `char` | Raw string element type | -| `crawstr_iter` | `struct { crawstr_value *ref; }` | UTF8 iterator | +| Type name | Type definition | Used to represent... | +|:----------------|:---------------------------------------------|:-------------------------| +| `crawstr` | `struct { const char *str; intptr_t size; }` | The string view type | +| `crawstr_value` | `const char` | The element type | +| `crawstr_iter` | `union { crawstr_value *ref; csview chr; }` | UTF8 iterator | ## Example: UTF8 iteration and case conversion ```c diff --git a/docs/cstr_api.md b/docs/cstr_api.md index bcb0d172..5f6ce9e4 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -152,7 +152,7 @@ char* cstrnstrn(const char* str, const char* search, intptr_t slen, intptr |:----------------|:---------------------------------------------|:---------------------| | `cstr` | `struct { ... }` | The string type | | `cstr_value` | `char` | String element type | -| `csview` | `struct { const char *str; intptr_t size; }` | String view type | +| `cstr_iter` | `union { cstr_value *ref; csview chr; }` | String iterator | | `cstr_buf` | `struct { char *data; intptr_t size, cap; }` | String buffer type | ## Constants and macros diff --git a/docs/csview_api.md b/docs/csview_api.md index 1d58d73c..76a803a8 100644 --- a/docs/csview_api.md +++ b/docs/csview_api.md @@ -96,8 +96,8 @@ uint64_t csview_hash(const csview* x); | Type name | Type definition | Used to represent... | |:----------------|:-------------------------------------------|:-------------------------| | `csview` | `struct { const char *buf; intptr_t size; }` | The string view type | -| `csview_value` | `char` | The string element type | -| `csview_iter` | `struct { csview_value *ref; }` | UTF8 iterator | +| `csview_value` | `const char` | The string element type | +| `csview_iter` | `union { csview_value *ref; csview chr; }` | UTF8 iterator | ## Constants and macros |
