summaryrefslogtreecommitdiff
path: root/qstd/str.h
blob: 8158554b90cc150bd91971aa2c750dca72c323d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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);

#endif