2026-05-26 22:28:06 -06:00
|
|
|
#ifndef LAE_STRINGS_H
|
|
|
|
|
#define LAE_STRINGS_H
|
|
|
|
|
|
2026-05-31 20:48:45 -06:00
|
|
|
#include "lae_allocator.h"
|
2026-05-26 22:28:06 -06:00
|
|
|
typedef struct ByteStr ByteStr;
|
|
|
|
|
|
2026-05-31 20:48:45 -06:00
|
|
|
typedef enum {
|
|
|
|
|
STR_OK,
|
|
|
|
|
STR_BAD_ALLOC,
|
|
|
|
|
STR_OUT_OF_BOUNDS,
|
|
|
|
|
STR_NULL_ARG,
|
|
|
|
|
STR_NULL_STRING,
|
|
|
|
|
STR_INVALID_CAPACITY,
|
|
|
|
|
} StringErr;
|
|
|
|
|
|
|
|
|
|
StringErr bstr_init(ByteStr **bstr, Allocator alloc, size_t capacity);
|
|
|
|
|
StringErr bstr_destroy(ByteStr **bstr);
|
|
|
|
|
|
2026-05-26 22:28:06 -06:00
|
|
|
#endif
|