diff options
Diffstat (limited to 'tnslc/utils.tnsl')
-rw-r--r-- | tnslc/utils.tnsl | 10 |
1 files changed, 10 insertions, 0 deletions
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++] |