stacinhtml

Static C in HTML - simple static site generator
git clone git://git.kocotian.pl/stacinhtml.git
Log | Files | Refs | README | LICENSE

commit 7d57863dd99991563e949e86af2ac672ec45389c
parent ac0f0c8807b42a80be3a3321b6f6bf9e61fa7ccc
Author: kocotian <kocotian@kocotian.pl>
Date:   Wed,  7 Apr 2021 09:37:32 +0200

str.h

Diffstat:
Astr.h | 39+++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+), 0 deletions(-)

diff --git a/str.h b/str.h @@ -0,0 +1,39 @@ +/* + stacinhtml - STAtic C IN HTML - simple static site generator + Copyright (C) 2021 Kacper Kocot <kocotian@kocotian.pl> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#ifndef _STR_H +#define _STR_H + +#include <ctype.h> +#include <sys/types.h> +#include <string.h> + +typedef struct { + char *data; + size_t len; +} String; + +String toString(char *s); +int Strcmp(String a, String b); +ssize_t Strtok(String string, String *out, char c); +String Striden(String string); +String Strtrim(String str); + +#endif