cstring

Lightweight string library for C
git clone git://git.christosmarg.xyz/cstring.git
Log | Files | Refs | README | LICENSE

commit b54a14818959358d44bfe8d68643017f0243c702
parent 276def19cd965d9881e633906d2eec73dcb41d3e
Author: Christos Margiolis <christos@margiolis.net>
Date:   Tue, 10 Nov 2020 13:52:15 +0200

edited README

Diffstat:
MREADME.md | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -99,7 +99,6 @@ Read the `man` page for more detailed info. * `CSTRING_OUT_OF_BOUNDS`: Check if value is out of bounds. * `CSTRING_ARR_LEN`: Determine an array's length. The macro must be called in the same function the array is declared. -* `CSTRING_FLAG_CHECK`: Check if flag is on. * `CSTRING_MALLOC`: Allocate memory with error checking. The following macros can only be used in debug mode * `CSTIRNG_DBG_LOG`: Prints a message in the format of `DEBUG: file:line:func(): msg`. @@ -112,6 +111,13 @@ The following macros can only be used in debug mode * `CSTRING_NPOS`: Signifies that a pattern hasn't been found inside the string. Its value is -1. * `CSTRING_INIT_EMPTY`: Used with `cstring_create` in case the string is to be initiliazed as empty. +## Flags + +* `CSTRING_SORT_ASCENDING`: Sort in ascending order. +* `CSTRING_SORT_DESCENDING`: Sort in descending order. +* `CSTRING_SORT_CALLBACK`: Sort using a callback function. +* `CSTRING_SORT_REST`: Sort the rest of the array. + ## Example See the test programs in `tests` for more.