summaryrefslogtreecommitdiffhomepage
path: root/docs/csview_api.md
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2022-06-02 06:20:31 +0200
committerTyge Lovset <[email protected]>2022-06-02 06:20:31 +0200
commit7ad5a8533daf107cdc0aa6f90af1fd4769557ea1 (patch)
treeeabd67555bbb1185937b4a5d9e57bd4b1477638b /docs/csview_api.md
parentccfef3a4f82ce48facde6499c53e62ab1065cd8b (diff)
downloadSTC-modified-7ad5a8533daf107cdc0aa6f90af1fd4769557ea1.tar.gz
STC-modified-7ad5a8533daf107cdc0aa6f90af1fd4769557ea1.zip
updated cstr and csview docs
Diffstat (limited to 'docs/csview_api.md')
-rw-r--r--docs/csview_api.md23
1 files changed, 10 insertions, 13 deletions
diff --git a/docs/csview_api.md b/docs/csview_api.md
index e95737b1..f6984f84 100644
--- a/docs/csview_api.md
+++ b/docs/csview_api.md
@@ -31,19 +31,11 @@ csview csview_new(const char literal_only[]); // make csvi
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_from_n(const char* str, size_t n); // construct
+void csview_clear(csview* self);
size_t csview_size(csview sv);
size_t csview_length(csview sv);
bool csview_empty(csview sv);
-char csview_front(csview sv);
-char csview_back(csview sv);
-
-void csview_clear(csview* self);
-
-// requires i_implement defined before one include of csview.h
-csview csview_substr_ex(csview sv, intptr_t pos, size_t n); // negative pos count from end
-csview csview_slice_ex(csview sv, intptr_t p1, intptr_t p2); // negative p1, p2 count from end
-csview csview_token(csview sv, csview sep, size_t* start); // see split example below.
bool csview_equals(csview sv, csview sv2);
size_t csview_find(csview sv, csview needle);
@@ -51,9 +43,10 @@ bool csview_contains(csview sv, csview needle);
bool csview_starts_with(csview sv, csview sub);
bool csview_ends_with(csview sv, csview sub);
-csview_iter csview_begin(const csview* self);
-csview_iter csview_end(const csview* self);
-void csview_next(csview_iter* it); // NB: UTF8 codepoint step, not byte!
+// requires i_implement defined before one include of csview.h
+csview csview_substr_ex(csview sv, intptr_t pos, size_t n); // negative pos count from end
+csview csview_slice_ex(csview sv, intptr_t p1, intptr_t p2); // negative p1, p2 count from end
+csview csview_token(csview sv, csview sep, size_t* start); // see split example below.
```
#### UTF8 methods
@@ -61,7 +54,11 @@ void csview_next(csview_iter* it); // NB: UTF8
size_t csview_size_u8(csview sv);
csview csview_substr_u8(csview sv, size_t u8pos, size_t u8len);
-// require linking with src/utf8code.c:
+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!
+
+// requires linking with src/utf8code.c:
bool csview_valid_u8(csview sv);
int csview_icmp(const csview* x, const csview* y);