aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2026-01-07 03:57:09 +0000
committernathan <nathansmith@disroot.org>2026-01-07 03:57:09 +0000
commitfd070849940355741b69fe5fbdf75a01dcc8f424 (patch)
tree068b2d87e5db33fe9978a8a1fd5c3fef8697bd55 /src/utils.c
parent382cb08822808f57902f67a842259e64afb33e72 (diff)
downloadFindThings-fd070849940355741b69fe5fbdf75a01dcc8f424.tar.gz
FindThings-fd070849940355741b69fe5fbdf75a01dcc8f424.tar.bz2
FindThings-fd070849940355741b69fe5fbdf75a01dcc8f424.zip
Cool text animation thingy
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 22ed7b4..e2e7d35 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -45,4 +45,16 @@ Image colorsToImage(Color* colors, int width, int height)
};
}
+size_t getStringLength(const char* text, size_t maxLength)
+{
+ size_t stringLength = 0;
+
+ while (stringLength < maxLength && text[stringLength] != '\0')
+ {
+ ++stringLength;
+ }
+
+ return stringLength;
+}
+
// Why does the universe feel strange to exist in?