!This project has been moved to chol!
A simple single-header STB-style string view library for C.
#include <stdio.h> /* printf */
#define CSV_IMPLEMENTATION
#include "csv.h"
int main(void) {
sv_t sv = sv_cstr("aabaacbaHelloabacb");
sv = sv_trim(sv, "abc");
printf(SV_FMT", world!\n", SV_ARG(sv));
return 0;
}
Output
Copy csv.h
into your project and include it, or submodule this repository and include
the header. See the examples.
To compile and run the examples, run
$ cc ./examples/trim.c -o trim
$ cc ./examples/find.c -o find
$ ./trim
$ ./find
If you find any bugs, please create an issue and report them.