summaryrefslogtreecommitdiffhomepage
path: root/docs/csview_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-12-19 12:21:44 +0100
committerTyge Løvset <[email protected]>2021-12-19 12:21:44 +0100
commit92b950333c6c7002bdbf1b60af44a249dc0cef9c (patch)
tree4b1acfcdba0bd940f829c53910587e27b5e0af90 /docs/csview_api.md
parent183a89859ba9914ee0546e4482b40be199e52292 (diff)
downloadSTC-modified-92b950333c6c7002bdbf1b60af44a249dc0cef9c.tar.gz
STC-modified-92b950333c6c7002bdbf1b60af44a249dc0cef9c.zip
First commit for Version 3 of STC. Main changes are consistent rename of '_del' to '_drop' and '_compare' to '_cmp'.
Also i_key_ref (earlier i_key_sptr) and i_val_ref replaced by more general i_key_bind/i_val_bind.
Diffstat (limited to 'docs/csview_api.md')
-rw-r--r--docs/csview_api.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/csview_api.md b/docs/csview_api.md
index 7daa67ee..609c5d10 100644
--- a/docs/csview_api.md
+++ b/docs/csview_api.md
@@ -77,7 +77,7 @@ bool cstr_ends_with_v(cstr s, csview sub);
```
#### Helper methods
```c
-int csview_compare(const csview* x, const csview* y);
+int csview_cmp(const csview* x, const csview* y);
bool csview_equalto(const csview* x, const csview* y);
uint64_t csview_hash(const csview* x, size_t dummy);
```
@@ -118,7 +118,7 @@ int main ()
cstr s3 = cstr_from_v(cstr_substr(s1, 0, 6)); // "Apples"
printf("%s %s\n", s2, s3.str);
- c_del(cstr, &str1, &s1, &s2, &s3);
+ c_drop(cstr, &str1, &s1, &s2, &s3);
}
```
Output:
@@ -166,7 +166,7 @@ int main()
print_split(c_sv("This has no matching separator"), c_sv("xx"));
puts("");
- c_autovar (cvec_str v = string_split(c_sv("Split,this,,string,now,"), c_sv(",")), cvec_str_del(&v))
+ c_autovar (cvec_str v = string_split(c_sv("Split,this,,string,now,"), c_sv(",")), cvec_str_drop(&v))
c_foreach (i, cvec_str, v)
printf("\"%s\"\n", i.ref->str);
}