From 1cbb15bc02562b77c6bb69c174cc08f5be76eea4 Mon Sep 17 00:00:00 2001 From: Kai Gunger Date: Sat, 18 Jul 2026 18:32:51 -0400 Subject: [tnslc] fix conversion func --- tnslc/utils/algo.tnsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tnslc/utils/algo.tnsl') diff --git a/tnslc/utils/algo.tnsl b/tnslc/utils/algo.tnsl index 4f3c6b2..31d9290 100644 --- a/tnslc/utils/algo.tnsl +++ b/tnslc/utils/algo.tnsl @@ -1,5 +1,5 @@ -/; strcmp(~uint8 a, b) [bool] +/; strcmp (~uint8 a, b) [bool] /; loop (a` == b` && a` !== 0 && b` !== 0) [a++; b++] ;/ /; if (b` == 0 && a` == 0) @@ -9,7 +9,7 @@ ;/ # Length of a cstr -/; strlen(~uint8 str) [int] +/; strlen (~uint8 str) [int] int out = 0 /; loop (str` !== 0) [str++; out++] ;/ return out @@ -64,9 +64,9 @@ /; if (ch !< '0' && ch !> '9') return ch - '0' ;; else if (ch !< 'a' && ch !> 'f') - return ch - 'a' + return ch - 'a' + 10 ;; else if (ch !< 'A' && ch !> 'F') - return ch - 'A' + return ch - 'A' + 10 ;/ return 0 ;/ -- cgit v1.2.3