From 9285c481dfbda67874765f06a54fc1ffb23f15aa Mon Sep 17 00:00:00 2001 From: Tyge Løvset <60263450+tylov@users.noreply.github.com> Date: Tue, 24 Nov 2020 20:52:10 +0100 Subject: Update cstr_api.md --- docs/cstr_api.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/cstr_api.md b/docs/cstr_api.md index 6ab29678..f804e1ff 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -1,6 +1,6 @@ # Introduction -This describes the API of the **cstr_t** API +This describes the API of **cstr_t**. ## Types @@ -86,19 +86,25 @@ void cstr_replace( cstr_t* self, size_t pos, size_t len, const char* str void cstr_replace_n( cstr_t* self, size_t pos, size_t len, const char* str, size_t n ); ``` +```c +size_t cstr_find( cstr_t s, const char* needle ); +size_t cstr_find_n( cstr_t s, const char* needle, size_t pos, size_t nlen ); +``` + ```c bool cstr_equals( cstr_t s1, const char* str ); bool cstr_equals_caseins( cstr_t s1, const char* str ); bool cstr_equals_s( cstr_t s1, cstr_t s2 ); int cstr_compare( const cstr_t *s1, const cstr_t *s2 ); int cstr_casecmp( const cstr_t *s1, const cstr_t *s2 ); -size_t cstr_find( cstr_t s, const char* needle ); -size_t cstr_find_n( cstr_t s, const char* needle, size_t pos, size_t nlen ); ``` ```c char* cstr_front( cstr_t* self ); char* cstr_back( cstr_t* self ); +``` + +```c cstr_iter_t cstr_begin( cstr_t* self ); cstr_iter_t cstr_end( cstr_t* self ); void cstr_next(cstr_iter_t* it) { ++it->val; } -- cgit v1.2.3