about summary refs log tree commit diff stats
path: root/src/utils/twtstr.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-24 21:07:32 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-24 21:07:32 +0200
commitd185ad35f504cae0d8abe35546e67f92267393cd (patch)
treeadf127e7870938cc3024a98e49021d38c3a693a6 /src/utils/twtstr.nim
parentc9104264a856d9edf09c05a94ae7062c16eafac5 (diff)
downloadchawan-d185ad35f504cae0d8abe35546e67f92267393cd.tar.gz
remove sequtils dependency
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r--src/utils/twtstr.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 64f66f88..ca79fa76 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -3,7 +3,6 @@ import strutils
 import unicode
 import os
 import math
-import sequtils
 import options
 
 import bindings/libunicode
@@ -286,8 +285,11 @@ const romanNumbers = [
   (40, "XL"), (10, "X"), (9, "IX"), (5, "V"), (4, "IV"), (1, "I")
 ]
 
-const romanNumbers_lower = romanNumbers.map(proc(x: auto): auto =
-  (x[0], x[1].tolower()))
+const romanNumbers_lower = block:
+  var res: seq[(int, string)]
+  for (n, s) in romanNumbers:
+    res.add((n, s.toLowerAscii()))
+  res
 
 func romanNumber*(i: int): string =
   return number_additive(i, 1..3999, romanNumbers)