diff dowa/dowa.h @ 63:fff1b048dda6

[Postdog] Fixed a problem where string did not wrap.
author June Park <parkjune1995@gmail.com>
date Tue, 23 Dec 2025 14:00:37 -0800
parents e06bc03d9618
children a30944e5719e
line wrap: on
line diff
--- a/dowa/dowa.h	Tue Dec 23 11:48:11 2025 -0800
+++ b/dowa/dowa.h	Tue Dec 23 14:00:37 2025 -0800
@@ -5,7 +5,12 @@
 #include <string.h> // stdup
 #include <stdlib.h> // only for malloc, free, stuff
 #include <assert.h> // mostly for TODO
+
+#ifdef DIRECTORY
+// Only for linux and mac since window do not support.  
+// Maybe move this into seobeo file directly?
 #include <dirent.h> // some functions loop through files
+#endif
 #include <math.h> // I am not re-writing stuff I guess...
 
 #include <sys/stat.h>
@@ -34,12 +39,6 @@
 typedef char           int8;     // 8-bit signed integer
 typedef char           boolean;  // Boolean type (0 = false, nonzero = true)
 
-
-// --- Miscellaneous --- //
-/* Just use atoid lmao*/
-char *Dowa_Int32ToString(uint32 value, char *buffer);
-
-
 // --- Arena Allocator --- //
 typedef struct {
   char   *buffer;
@@ -111,6 +110,12 @@
 /* Returns the number of entries currently in the hashmap. */
 extern uint32        Dowa_HashMap_Get_Count(Dowa_PHashMap p_hash_map);
 
+// --- String manipuliation -- //
+// Splice string from start to end
+const char *Dowa_String_Slice(const char *from, size_t start, size_t end);
+// --- Miscellaneous --- //
+char *Dowa_Int32ToString(uint32 value, char *buffer); /* Just use atoid lmao*/
+
 // --- Utility Functions --- //
 /* Prints all entries in the hashmap to stdout for debugging purposes. */
 extern void          Dowa_HashMap_Print(Dowa_PHashMap map);