LordOfTrident / csv

A stringview library for C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

!This project has been moved to chol!

csv

License Issues GitHub pull requests


A simple single-header STB-style string view library for C.

Table of contents

Simple example

#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

Quickstart

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

Bugs

If you find any bugs, please create an issue and report them.

About

A stringview library for C

License:GNU General Public License v3.0


Languages

Language:C 100.0%