diff options
| author | Tyge Løvset <[email protected]> | 2021-02-25 16:32:06 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-02-25 16:32:06 +0100 |
| commit | 5cb2da687a58829a788a93c51808e6d59637862b (patch) | |
| tree | 4db54a1820ce10690d79abd6fb0ac5bfd00d3d03 /docs | |
| parent | 7d608d825799b2cd8cc9f84bdd647848581787ae (diff) | |
| download | STC-modified-5cb2da687a58829a788a93c51808e6d59637862b.tar.gz STC-modified-5cb2da687a58829a788a93c51808e6d59637862b.zip | |
Some cstr doc minors.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/cstr_api.md | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/docs/cstr_api.md b/docs/cstr_api.md index 11cd1214..b3e138a6 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -19,7 +19,7 @@ cstr cstr_init(void); // constru cstr cstr_with_capacity(size_t cap); cstr cstr_with_size(size_t len, char fill); // repeat fill len times cstr cstr_from(const char* str); -cstr cstr_from_n(const char* str, size_t len); +cstr cstr_from_n(const char* str, size_t n); cstr cstr_from_fmt(const char* fmt, ...); // printf() formatting cstr cstr_clone(cstr s); @@ -34,12 +34,12 @@ size_t cstr_reserve(cstr* self, size_t capacity); void cstr_resize(cstr* self, size_t len, char fill); void cstr_clear(cstr* self); cstr* cstr_assign(cstr* self, const char* str); -cstr* cstr_assign_n(cstr* self, const char* str, size_t len); +cstr* cstr_assign_n(cstr* self, const char* str, size_t n); cstr* cstr_take(cstr* self, cstr s); // take the constructed or moved string cstr cstr_move(cstr* self); // move string to caller, leave empty string cstr* cstr_append(cstr* self, const char* str); -cstr* cstr_append_n(cstr* self, const char* str, size_t len); // appends max len characters +cstr* cstr_append_n(cstr* self, const char* str, size_t n); // appends len characters void cstr_push_back(cstr* self, char ch); void cstr_pop_back(cstr* self); void cstr_insert(cstr* self, size_t pos, const char* str); @@ -54,8 +54,8 @@ bool cstr_equals(cstr s, const char* str); bool cstr_equals_s(cstr s, cstr s2); bool cstr_iequals(cstr s, const char* str); // prefix i = case-insensitive size_t cstr_find(cstr s, const char* substr); -size_t cstr_find_n(cstr s, const char* substr, size_t pos, size_t nlen); -size_t cstr_ifind_n(cstr s, const char* substr, size_t pos, size_t nlen); +size_t cstr_find_n(cstr s, const char* substr, size_t pos, size_t n); +size_t cstr_ifind_n(cstr s, const char* substr, size_t pos, size_t n); bool cstr_contains(cstr s, const char* substr); bool cstr_icontains(cstr s, const char* substr); bool cstr_begins_with(cstr s, const char* substr); @@ -79,10 +79,9 @@ const char* cstr_c_str(const cstr* x); int cstr_compare_raw(const char** x, const char** y); bool cstr_equals_raw(const char** x, const char** y); uint32_t cstr_hash_raw(const char* const* x, size_t ignored); -char* c_strcopy(const char* src, char* dst, const char* dst_end, int termin); int c_strncasecmp(const char* s1, const char* s2, size_t n); -char* c_strnfind(const char* str, const char* needle, size_t nmax); -char* c_istrnfind(const char* str, const char* needle, size_t nmax); +char* c_strnfind(const char* str, const char* needle, size_t n); +char* c_istrnfind(const char* str, const char* needle, size_t n); uint32_t c_strhash(const char* str); ``` Helper methods, used by other container types. |
