summaryrefslogtreecommitdiff
path: root/qstd/str.h
blob: cb357967f2ecfb1070ba436742f8c943bb1d9a37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef str_h
#define str_h

#include <stddef.h>
#include <stdint.h>

struct Arena;
struct Heap;

uint64_t fnv1a64(uint8_t* buf, size_t size);
uint64_t fnv1a64_2(uint64_t h, uint8_t* buf, size_t size);
uint32_t hash_string(const char* s);

int string_equal(const char* a, const char* b);
int string_copy(char* dst, const char* src);
int string_len(const char* s);
char* dup_string(struct Arena* a, const char* s);
char* dup_stringh(struct Heap* h, const char* s);
const char* next_line(const char* line);

#endif