mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-07 18:22:50 -06:00
initial import of the C runtime
This commit is contained in:
29
src/runtime/c/gu/str.h
Normal file
29
src/runtime/c/gu/str.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef GU_STR_H_
|
||||
#define GU_STR_H_
|
||||
|
||||
#include <gu/mem.h>
|
||||
#include <gu/hash.h>
|
||||
|
||||
extern const char gu_empty_str[];
|
||||
extern const char* const gu_null_str;
|
||||
|
||||
typedef const char* GuStr;
|
||||
|
||||
char* gu_new_str(size_t size, GuPool* pool);
|
||||
|
||||
char* gu_strdup(const char* str, GuPool* pool);
|
||||
|
||||
bool
|
||||
gu_str_eq(GuStr s1, GuStr s2);
|
||||
|
||||
extern GuHasher gu_str_hasher[1];
|
||||
|
||||
#include <gu/type.h>
|
||||
|
||||
extern GU_DECLARE_TYPE(GuStr, repr);
|
||||
|
||||
char* gu_vasprintf(const char* fmt, va_list args, GuPool* pool);
|
||||
|
||||
char* gu_asprintf(GuPool* pool, const char* fmt, ...);
|
||||
|
||||
#endif // GU_STR_H_
|
||||
Reference in New Issue
Block a user