๐ Just the core GLib types: GString, GArray, and GHashTable
GString *name = g_string_new("Alan Turing");
printf("๐ Hello %.*s!\n", (int) name->len, name->str); |
TODO: Publish to a library repository or something
git submodule add https://github.com/jcbhmr/miniglib.git
git -C ./miniglib switch --detach v1.0.0cc -std=c23 -I ./miniglib/include/ -o ./build/hello-world ./miniglib/src/*.c ./src/*.cAfter downloading the library and configuring your build system to incorporate this library, you can use the following code snippets to get started.
#include <stdio.h>
#include <miniglib.h>
int main() {
GString *name1 = g_string_new("Alan Turing");
GString *name2 = g_string_new("Ada Lovelace");
printf("%.*s says hello to %.*s\n", (int) name1->len, name1->str, (int) name2->len, name2->str);
g_string_free(name1, true);
g_string_free(name2, true);
return 0;
}TODO: Write this section