summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-06-15 09:51:49 +0200
committerTyge Løvset <[email protected]>2021-06-15 09:51:49 +0200
commit0e52b558cbe7cd3ac54bf3aba88c5679c43d6e39 (patch)
tree40df20188fb374d50c8411c14cccf0fafc27f65d /docs
parentb8f24b90481d83d06ae89e2594c249c9741dae21 (diff)
downloadSTC-modified-0e52b558cbe7cd3ac54bf3aba88c5679c43d6e39.tar.gz
STC-modified-0e52b558cbe7cd3ac54bf3aba88c5679c43d6e39.zip
Fixed c_strnstrn() and cstr_find_n() bugs. when find string is empty.
Added cstr_from_replace_all() and cstr_replace_all_v() to do replace-all from csview inputs.
Diffstat (limited to 'docs')
-rw-r--r--docs/cstr_api.md4
-rw-r--r--docs/csview_api.md2
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/cstr_api.md b/docs/cstr_api.md
index 8dec7f2f..cdb73a69 100644
--- a/docs/cstr_api.md
+++ b/docs/cstr_api.md
@@ -96,8 +96,8 @@ int c_rawstr_compare(const char** x, const char** y);
bool c_rawstr_equals(const char** x, const char** y);
uint64_t c_rawstr_hash(const char* const* x, size_t ignored);
int c_strncasecmp(const char* str1, const char* str2, size_t n);
-char* c_strnstrn(const char* str, const char* needle, size_t slen, size_t nmax);
-char* c_strncasestrn(const char* str, const char* needle, size_t slen, size_t nmax);
+char* c_strnstrn(const char* str, const char* needle, size_t slen, size_t nlen);
+char* c_strncasestrn(const char* str, const char* needle, size_t slen, size_t nlen);
```
## Types
diff --git a/docs/csview_api.md b/docs/csview_api.md
index ba2697bd..bd4945c0 100644
--- a/docs/csview_api.md
+++ b/docs/csview_api.md
@@ -58,6 +58,7 @@ void csview_next(csview_iter_t* it);
#### Extended cstr methods
```c
cstr cstr_from_v(csview sv); // construct cstr from csview
+cstr cstr_from_replace_all(csview sv, csview find, csview replace);
csview cstr_sv(cstr s); // convert to csview from cstr
csview cstr_to_v(const cstr* self); // convert to csview from cstr*
@@ -68,6 +69,7 @@ cstr* cstr_assign_v(cstr* self, csview sv);
cstr* cstr_append_v(cstr* self, csview sv);
void cstr_insert_v(cstr* self, size_t pos, csview sv);
void cstr_replace_v(cstr* self, size_t pos, size_t len, csview sv);
+void cstr_replace_all_v(cstr* self, csview find, csview replace);
bool cstr_equals_v(cstr s, csview sv);
size_t cstr_find_v(cstr s, csview needle);