From c3d23d3091c23978b12c140e6cfd964eff1d3986 Mon Sep 17 00:00:00 2001 From: nodist Date: Fri, 13 Nov 2026 16:28:13 -0500 Subject: rewrite --- include/kpl/string.h | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 include/kpl/string.h (limited to 'include/kpl/string.h') diff --git a/include/kpl/string.h b/include/kpl/string.h deleted file mode 100644 index 8c88825..0000000 --- a/include/kpl/string.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * KPL UTF-8 string and character methods - */ - -#pragma once - -/* - * Create new string - */ -kpl_object_string *kpl_object_string_create(kpl_thread *thread, int32_t bytes_size); - -/* - * Create a string from a c string - * Copies the c string - */ -inline kpl_object_string *kpl_object_string_from_c_string(kpl_thread *thread, const char *c_string) { - int32_t bytes_size = strlen(c_string); - kpl_object_string *object_string = kpl_object_string_create(thread, bytes_size); - object_string->bytes_length = bytes_size; - memcpy(object_string->bytes, c_string, bytes_size); - return object_string; -} - -/* - * Return string to gc before sweep - */ -inline void kpl_object_string_destroy(kpl_thread *thread, kpl_object_string *object_string) { - kpl_gc_delete(thread, (kpl_object*) object_string); -} -- cgit v1.2.3