SayoriOS 0.3.3

string.h
1 //
2 // Created by ndraey on 04.10.23.
3 //
4
5 #pragma once
6
7 #include "common.h"
8 #include "../../../src/lib/libvector/include/vector.h"
9
10 typedef struct string {
11 char* data;
12
13 size_t length;
14 } string_t;
15
16 #define ADDR2STRING(addr) ((string_t*)(addr))
17
18 string_t* string_new();
19 void string_append_charptr(string_t* string, const char* concatenable);
20 void string_append(string_t* string, const string_t* concatenable);
21 void string_crop(string_t* string, size_t start, size_t end);
22 void string_append_char(string_t* string, char ch);
23 string_t* string_from_charptr(const char* chars);
24 string_t* string_from_sized_charptr(const char* chars, size_t length);
25 vector_t* string_split(string_t* string, const char* delimiter);
26 void string_split_free(vector_t* vec);
27 string_t* string_clone(string_t* str);
28 void string_reverse(string_t* str);
29 string_t* string_from_integer(int number);
30 void string_destroy(string_t *string);
common.h
Основные определения ядра
string
Definition: string.h:10
vector
Definition: vector.h:7