2026-06-20 14:47:11 +02:00
2026-06-20 14:47:11 +02:00
2026-06-20 14:24:41 +02:00
2026-06-20 14:47:11 +02:00

tk_sfl
Tilo Klarenbeek single file libraries

---

Probably don't use these, if you really want to:


*** tk_memory.h ***
```
#include "tk_memory.h"
#define TK_MEMORY_IMPLEMENTATION

int main() {
    void* ptr = tk_malloc(1024);
    tk_free(ptr);

    tk_check_memory_leaks();
}

```

Define DEBUG to initalize memory with OXFE, to detect uninitialized memory.
Define DEBUG AND TK_MEMORY_TRACK to catch memory leaks when calling tk_check_memory_leaks().


*** tk_strings.h ***
```
#define TK_STRINGS_IMPLEMENTATION
#include "tk_strings.h"

#include <stdlib.h>

int main() {
    char str[] = "  Hello, World  ";
    tk_str_to_lower(str);

    char* trimmed = tk_str_trim(str);
    uint8_t contains = tk_str_contains(trimmed, "hello");

    free(trimmed);
    return contains ? 0 : 1;
}

```

String utilities include counting characters/substrings, splitting by character or substring, case conversion, concatenation, trimming, and substring checks.
S
Description
No description provided
Readme
40 KiB
0 Stars 1 Watchers 0 Forks
Languages
C 100%