From d3dfc56318829e212a87da6874011d8304be31b0 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 6 Aug 2023 03:00:18 -0400 Subject: Frame out port of compiler --- tnslc/utils.tnsl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tnslc/utils.tnsl') diff --git a/tnslc/utils.tnsl b/tnslc/utils.tnsl index 9fe113a..54f01aa 100644 --- a/tnslc/utils.tnsl +++ b/tnslc/utils.tnsl @@ -71,6 +71,16 @@ return false ;/ +/; cstr_contains (~uint8 cstr, uint8 c) [bool] + int j = cstr_len(cstr) + /; loop (int i = 0; i < j) [i++] + /; if (cstr{i} == c) + return true + ;/ + ;/ + return false +;/ + /; write_to_file(~void file, ~uint8 string) int ln = cstr_len(string) /; loop (int i = 0; i < ln) [i++] -- cgit v1.2.3