From bedd2e7ccb1595c23e159eaa952ae1b0b5a3d2ad Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 15 Mar 2014 01:49:50 +0100 Subject: Lean and mean initial commit Not much functionality yet --- bstr.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 bstr.h (limited to 'bstr.h') diff --git a/bstr.h b/bstr.h new file mode 100644 index 0000000..5b18778 --- /dev/null +++ b/bstr.h @@ -0,0 +1,12 @@ +#include + +int bstr_diff(const char* a,const char* b); +#define bstr_equal(s,t) (!bstr_diff((s),(t))) + +int bstr_diff2(const char* a,const char* b,size_t blen); +#define bstr_equal2(s,t,l) (!bstr_diff2((s),(t),(l))) + +size_t bstrlen(const char* a); +size_t bstrstart(const char* a); /* offset of first byte of bstring */ + +const char* bstrfirst(const char* a); /* pointer to first byte of bstring */ -- cgit v1.2.3-55-g7522