blob: 76bcc344c0653dcfa9c69be46c94e5dce1c66f46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef _S8_H
#define _S8_H
#include <stdbool.h>
#include <stdint.h>
#define s8(s) ((struct s8){s, strlen(s)})
struct s8 {
char *s;
uint32_t l;
};
bool s8eq(struct s8 s1, struct s8 s2);
int s8cmp(struct s8 s1, struct s8 s2);
char *s8tocstr(struct s8 s);
bool s8startswith(struct s8 s, struct s8 prefix);
struct s8 s8dup(struct s8 s);
#endif
|