diff options
| author | Tyge Løvset <[email protected]> | 2020-11-24 21:11:23 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-24 21:11:23 +0100 |
| commit | 0b23873961f118e3f620ce0c60f812866cad0b15 (patch) | |
| tree | 4411021c3399906e88bf1993210495b01b0284f2 /docs/cstr_api.md | |
| parent | f13aa92e194d9974f0847817f8e7d35e6bf99a02 (diff) | |
| download | STC-modified-0b23873961f118e3f620ce0c60f812866cad0b15.tar.gz STC-modified-0b23873961f118e3f620ce0c60f812866cad0b15.zip | |
Doc refinement.
Diffstat (limited to 'docs/cstr_api.md')
| -rw-r--r-- | docs/cstr_api.md | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/docs/cstr_api.md b/docs/cstr_api.md index 107d5be6..4abf8a33 100644 --- a/docs/cstr_api.md +++ b/docs/cstr_api.md @@ -28,18 +28,17 @@ All cstr definitions and prototypes may be included in your C source file by inc The interfaces to create a cstr_t object: ```c -cstr_t cstr_init( void ); -cstr_t cstr_with_capacity( size_t cap ); -cstr_t cstr_with_size( size_t len, char fill ); -cstr_t cstr_from( const char* str ); -cstr_t cstr_from_n( const char* str, size_t len ); -cstr_t cstr_from_fmt( const char* fmt, ... ); +cstr_t cstr_init( void ); +cstr_t cstr_with_capacity( size_t cap ); +cstr_t cstr_with_size( size_t len, char fill ); +cstr_t cstr_from( const char* str ); +cstr_t cstr_from_n( const char* str, size_t len ); +cstr_t cstr_from_fmt( const char* fmt, ... ); ``` ## Destruction - ```c -void cstr_del( cstr_t *self ); +void cstr_del( cstr_t *self ); ``` ## Interface @@ -111,7 +110,7 @@ int cstr_compare( const cstr_t *s1, const cstr_t *s2 ); int cstr_casecmp( const cstr_t *s1, const cstr_t *s2 ); ``` -### Reference to front and back of string +### Get references to front and back of string ```c char* cstr_front( cstr_t* self ); char* cstr_back( cstr_t* self ); @@ -139,7 +138,7 @@ int c_strcasecmp( const char* s1, const char* s2 ); uint32_t c_string_hash( const char* str ); ``` -## Helper functions +### Helper functions ```c const char* cstr_to_raw( const cstr_t* x ); int cstr_compare_raw( const char** x, const char** y ); |
