Single allocation string implementation (with struct) c99 at least, more convenient and performance that common null terminated char*, 100% compatible with them :) and accept multiple encodings.
It's not yet ready to be a shared library, use static instead. It's not stable enough.
-
UTF8
-
UTF32be
-
UTF32le
-
ascii
-
binary
Used for unknown or user data. Internally is handled as ascii (byte to byte)
include a single header
#include "stringc.h"
include .libs/ and link against libstringc.la
After usage you need to st_memfree some cache variable:
// cleaning caches
st_memfree();
autoconf is required.
RHEL
sudo yum install autoconf
sudo yum install libtool
sh autogen.sh
./configure
make
sh test.sh
Just send a PR.
We use clang-format to keep an uniform coding style, before PR always use:
sh format.sh
We use cldoc + our formatter to output markdown.
sh doc.sh
sh code-coverage.sh
TODO
- Use a variable in makefile.am?
- new Phony target?
meanwhile... edit makefile.am
- comment: test_run_tests_SOURCES = test/run-tests.c
- uncomment: test_run_tests_SOURCES = test/run-benchmarks.c
sh benchmarks.sh oldversion
# do your changes and recompile
sh benchmarks.sh newversion
node compare.js oldversion newversion
# open with your browser bench_data/comparison.html
install phyton...
cd /tmp
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install gcovr