From 0921f32730134bcd2961cc89dca0c3dab445f27d Mon Sep 17 00:00:00 2001 From: mick Date: Mon, 13 Mar 2023 16:10:47 +1100 Subject: [PATCH] minor readme --- README.md | 8 +++++++- docs/strview-api.md | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e6c616a..7cfcb6d 100644 --- a/README.md +++ b/README.md @@ -163,10 +163,16 @@ While this is a string api, dropping the requirement for null termination means If the buffer holding the string is available, the buf->cstr member can be accessed and will always contain a null terminated string. - For passing a view to printf, two macros defined for this **PRIstr** and **PRIstrarg()**, which make use if printf's dynamic precision to limit the number of characters read. These are __PRIstr__ for the type, and __PRIstrarg__ as an argument wrapper. + For passing a view to printf, two macros are defined for this **PRIstr** and **PRIstrarg()**, which make use of printf's dynamic precision to limit the number of characters read. These are __PRIstr__ for the type, and __PRIstrarg__ as an argument wrapper. printf("The string is %"PRIstr"\n", PRIstrarg(mystring)); +  +# For more details on the usage of strbuf.h strview.h and strnum.h see the following: + * [strbuf.h api reference](/docs/strbuf-api.md) + * [strview.h api reference](/docs/strview-api.md) + * [strnum.h api reference](/docs/strnum-api.md) +   # Contributing diff --git a/docs/strview-api.md b/docs/strview-api.md index 32ba14d..ed2de28 100644 --- a/docs/strview-api.md +++ b/docs/strview-api.md @@ -216,11 +216,11 @@ Simply assign the source to your destination before splitting:   ## `strview_t strview_split_left(strview_t* strview_ptr, strview_t pos);` -Given a view (pos) into strview_ptr, will return a strview_t containing the content to the left of strview_ptr. +Given a view (pos) into strview_ptr, will return a strview_t containing the content to the left of strview_ptr. The returned view will be removed (popped) from strview_ptr.   ## `strview_t strview_split_right(strview_t* strview_ptr, strview_t pos);` -Given a view (pos) into strview_ptr, will return a strview_t containing the content to the right of strview_ptr. +Given a view (pos) into strview_ptr, will return a strview_t containing the content to the right of strview_ptr. The returned view will be removed (popped) from strview_ptr.   ## `char strview_pop_first_char(strview_t* strview_ptr);`