blob: 5f875e0948043fb65ed0af8dc4dcceb54627c434 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#ifndef BASE_STRING_H
#define BASE_STRING_H
#define _StringCast (string)
#define StringCast { .data (u8 *)(string), .size = (sizeof((string)) - 1)}
#define PushString (Arena, Size) StringCast{.data = PushArray((arena), PushStruct(u8), (Size)), .size = (u64)(Size)}
typedef struct string string;
struct string
{
u8 *data;
u64 size;
};
#endif /* BASE_STRING_H */
|