c-util
https://github.com/standardloop/c-util
About
c-util is a dynamic library of utililty based functions I use in more than one project.
In the future, this may be split off, but for now it is grouped like this.
explode
EveryoneExplodeNow(2)
This functions turns a string into an array of strings based on a delim character.
This is similiar to split() in python or explode() in php.
The function name, EveryoneExplodeNow() is a play on the funny Pokémon card move.
EveryoneExplodeNowHandleQuotes(3)
Similiar to above but characters that in quotes will not be split.
env
GetEnv(2)
Gets an environment variable, if the variable is not present, allows for a fallback.
stringhelpers
IsCharInString(2)
returns true or false if a character is in a string.
NumCharInString(2)
returns the number of a specific character in a string.
StringToLower(1)
modifies the input string to be lowercase.
StringToUpper(1)
modifies the input string to be uppercase.
PutQuotesAroundString(2)
Takes an input string and returns a new string with quotes around it.
regex (WIP)
temp (WIP)
needs to be reorganized
Available Tasks
task: Available tasks for this project:
* default
* release
* test
* test:build-sanitize
* test:build
* test:run
* clean
* fmt
* docs
Docs
Docs are generated a first generated with doxygen as xml and then moxygen reads the xml to output markdown in the docs/ folder.
This repo uses reusable tasks from https://github.com/standardloop/taskfiles/
Precommit
This repo uses prek.
Please run prek install.