some Array improvements

This commit is contained in:
2023-01-20 19:57:37 +06:00
parent 3a20caf380
commit 29a5b22286
7 changed files with 42 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
#include "string.h"
ktid_define(string);
Array_define(string);
// copies str content to new char pointer value (adding '\0' at the end)
char* string_extract(string str){

View File

@@ -5,6 +5,7 @@ extern "C" {
#endif
#include "../base/base.h"
#include "../Array/Array.h"
// my fixed length string struct
// doesn't store '\0' at the end
@@ -13,6 +14,7 @@ typedef struct string{
uint64 length; // amount of chars in ptr value
} string;
ktid_declare(string);
Array_declare(string);
static const string stringNull={NULL,0};