diff options
| author | Tyge Løvset <[email protected]> | 2022-09-22 13:04:58 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-22 13:04:58 +0200 |
| commit | 4c5f0ba23ba6294e144243555ed3c02a72259692 (patch) | |
| tree | 380b249e1c36b83b65507da5a2af4f843252a474 /docs/csview_api.md | |
| parent | 61c222312bb1cc03ab987fdbc541039723c9e243 (diff) | |
| download | STC-modified-4c5f0ba23ba6294e144243555ed3c02a72259692.tar.gz STC-modified-4c5f0ba23ba6294e144243555ed3c02a72259692.zip | |
Updated _advance() iter methods. Some have signed offsets.
utf8_peek()/utf8_peek_off() added/changed.
Diffstat (limited to 'docs/csview_api.md')
| -rw-r--r-- | docs/csview_api.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/csview_api.md b/docs/csview_api.md index 5cc05c02..37ebf79a 100644 --- a/docs/csview_api.md +++ b/docs/csview_api.md @@ -55,6 +55,7 @@ bool csview_valid_utf8(csview sv); // requires csview_iter csview_begin(const csview* self); csview_iter csview_end(const csview* self); void csview_next(csview_iter* it); // utf8 codepoint step, not byte! +csview_iter csview_advance(csview_iter it, isize_t n); // from utf8.h size_t utf8_size(const char *s); @@ -67,7 +68,8 @@ bool utf8_valid(const char* s); bool utf8_valid_n(const char* s, size_t nbytes); uint32_t utf8_decode(utf8_decode_t *d, uint8_t byte); // decode next byte to utf8, return state. unsigned utf8_encode(char *out, uint32_t codepoint); // encode unicode cp into out buffer -uint32_t utf8_peek(const char* s, int pos); // codepoint value at utf8 pos (may be negative) +uint32_t utf8_peek(const char* s); // codepoint value of character at s +uint32_t utf8_peek_off(const char* s, int offset); // codepoint value at utf8 pos (may be negative) ``` #### Extended cstr methods |
