summaryrefslogtreecommitdiffhomepage
path: root/docs/cstr_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-01-29 17:24:33 +0100
committerTyge Løvset <[email protected]>2023-01-29 17:24:33 +0100
commit209bf743e0c1253a4bc81d2ffb6897f657a84c8a (patch)
tree9631a2a79e1890cb7c46515aae0ef105710ad59c /docs/cstr_api.md
parenta344b43728ff40a2e1ee25f2f1b592f33432aee7 (diff)
downloadSTC-modified-209bf743e0c1253a4bc81d2ffb6897f657a84c8a.tar.gz
STC-modified-209bf743e0c1253a4bc81d2ffb6897f657a84c8a.zip
Some method renaming in cspan: cspan_multidim() ctor => cspan_md(). cspan_atN() => cspan_submdN().
cstr_replace_ex() merged as overload of cstr_replace().
Diffstat (limited to 'docs/cstr_api.md')
-rw-r--r--docs/cstr_api.md5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/cstr_api.md b/docs/cstr_api.md
index 4f895549..48999654 100644
--- a/docs/cstr_api.md
+++ b/docs/cstr_api.md
@@ -68,8 +68,7 @@ void cstr_insert_s(cstr* self, size_t pos, cstr ins);
void cstr_erase(cstr* self, size_t pos, size_t len); // erase len bytes from pos
-void cstr_replace(cstr* self, const char* search, const char* repl);
-void cstr_replace_ex(cstr* self, const char* search, const char* repl, unsigned count);
+void cstr_replace(cstr* self, const char* search, const char* repl, unsigned count = MAX_INT);
cstr cstr_replace_sv(csview in, csview search, csview repl, unsigned count);
void cstr_replace_at(cstr* self, size_t pos, size_t len, const char* repl); // replace at a position
void cstr_replace_at_sv(cstr* self, size_t pos, size_t len, const csview repl);
@@ -174,7 +173,7 @@ int main() {
cstr_erase(&s1, 7, 5); // -nine
printf("%s\n", cstr_str(&s1));
- cstr_replace_ex(&s1, "seven", "four", 1);
+ cstr_replace(&s1, "seven", "four", 1);
printf("%s\n", cstr_str(&s1));
// reassign: