From 0b23873961f118e3f620ce0c60f812866cad0b15 Mon Sep 17 00:00:00 2001 From: Tyge Løvset <60263450+tylov@users.noreply.github.com> Date: Tue, 24 Nov 2020 21:11:23 +0100 Subject: Doc refinement. --- docs/cstr_api.md | 19 +++++++++---------- 1 file 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 ); -- cgit v1.2.3