summaryrefslogtreecommitdiffhomepage
path: root/docs/csview_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-06-02 06:33:10 +0200
committerGitHub <[email protected]>2022-06-02 06:33:10 +0200
commit1732086e71074951ea5bf6ca000c907bd933369b (patch)
tree1f74f082324f02d08cb0800006027ea247745c13 /docs/csview_api.md
parent3ff0a42bc3c0836c5cfddfd909292c1b5a64c403 (diff)
downloadSTC-modified-1732086e71074951ea5bf6ca000c907bd933369b.tar.gz
STC-modified-1732086e71074951ea5bf6ca000c907bd933369b.zip
Update csview_api.md
Diffstat (limited to 'docs/csview_api.md')
-rw-r--r--docs/csview_api.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/csview_api.md b/docs/csview_api.md
index f6984f84..4baba506 100644
--- a/docs/csview_api.md
+++ b/docs/csview_api.md
@@ -27,9 +27,9 @@ All csview definitions and prototypes are available by including a single header
```c
csview c_sv(const char literal_only[]); // alias for csview_new
-csview csview_new(const char literal_only[]); // make csview from literal, no strlen()
-csview csview_from_s(const cstr* s); // convert to csview from cstr
-csview csview_from(const char* str); // make csview from const char*
+csview csview_new(const char literal_only[]); // construct from literal, no strlen()
+csview csview_from(const char* str); // construct from const char*
+csview csview_from_s(const cstr* s); // construct from cstr
csview csview_from_n(const char* str, size_t n); // construct
void csview_clear(csview* self);
@@ -50,7 +50,7 @@ csview csview_token(csview sv, csview sep, size_t* start); // see sp
```
#### UTF8 methods
-```
+```c
size_t csview_size_u8(csview sv);
csview csview_substr_u8(csview sv, size_t u8pos, size_t u8len);
@@ -60,7 +60,6 @@ void csview_next(csview_iter* it); // utf8 c
// requires linking with src/utf8code.c:
bool csview_valid_u8(csview sv);
-int csview_icmp(const csview* x, const csview* y);
// from utf8.h/utf8code.c:
bool utf8_valid(const char* s);
@@ -97,6 +96,7 @@ bool cstr_ends_with_sv(cstr s, csview sub);
#### Helper methods
```c
int csview_cmp(const csview* x, const csview* y);
+int csview_icmp(const csview* x, const csview* y);
bool csview_eq(const csview* x, const csview* y);
uint64_t csview_hash(const csview* x);
```