view include/str.h @ 13:41b74137e201

include: make header guards sane double underscores are reserved to the implementation by the C standard
author Paper <paper@paper.us.eu.org>
date Wed, 03 Apr 2024 20:48:51 -0400
parents 0c98b46eaf73
children
line wrap: on
line source

#ifndef EDL_INTERNAL_STR_H_
#define EDL_INTERNAL_STR_H_

#include <stddef.h>

typedef struct {
    size_t size;
    size_t capacity;
    char* data;
} EDL_internal_string;

int EDL_internal_string_init(EDL_internal_string* str);
int EDL_internal_string_allocate(EDL_internal_string* str, size_t new_capacity);
int EDL_internal_string_append(EDL_internal_string* str, const char* data, const size_t length);
void EDL_internal_string_free(EDL_internal_string* str);

#endif /* EDL_INTERNAL_STR_H_ */