summaryrefslogtreecommitdiffstats
path: root/src/lisiblestd/string.h
diff options
context:
space:
mode:
authorClement Sibille <clements+git@lisible.xyz>2024-05-09 08:58:14 +0900
committerClement Sibille <clements+git@lisible.xyz>2024-05-09 08:58:14 +0900
commit5a26e1f481fe85f08093a414e27c1056b85c6715 (patch)
tree20a2384554cfcb437a4b604e02b4a9978507cafc /src/lisiblestd/string.h
Initial commit
Diffstat (limited to '')
-rw-r--r--src/lisiblestd/string.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lisiblestd/string.h b/src/lisiblestd/string.h
new file mode 100644
index 0000000..79ee6b8
--- /dev/null
+++ b/src/lisiblestd/string.h
@@ -0,0 +1,19 @@
+#ifndef LSTD_STRING_H
+#define LSTD_STRING_H
+
+#include "memory.h"
+#include "types.h"
+#include <stdbool.h>
+
+struct String {
+ char *value;
+ usize length;
+};
+
+typedef struct String String;
+
+bool String_from_str(Allocator *allocator, String *string, const char *str);
+void String_destroy(Allocator *allocator, String *string);
+usize String_length(const String *string);
+
+#endif // LSTD_STRING_H
Go back to lisible.xyz