src/string.c

changeset 1155
b77d56a27e9c
parent 1137
61939929030a
child 1161
747c4baed44f
--- a/src/string.c	Sun Jan 26 11:59:16 2025 +0100
+++ b/src/string.c	Sun Jan 26 12:24:49 2025 +0100
@@ -847,8 +847,7 @@
     bool neg = false;
     size_t start_unsigned = 0;
 
-    // trim already, to search for a sign character
-    str = cx_strtrim(str);
+    // emptiness check
     if (str.length == 0) {
         errno = EINVAL;
         return -1;
@@ -941,7 +940,6 @@
 
 int cx_strtoull_lc_(cxstring str, unsigned long long *output, int base, const char *groupsep) {
     // some sanity checks
-    str = cx_strtrim(str);
     if (str.length == 0) {
         errno = EINVAL;
         return -1;
@@ -1070,8 +1068,7 @@
     // TODO: overflow check
     // TODO: increase precision
 
-    // trim and check
-    str = cx_strtrim(str);
+    // emptiness check
     if (str.length == 0) {
         errno = EINVAL;
         return -1;

mercurial