about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/strwidth.nim2
-rw-r--r--src/utils/twtstr.nim4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/strwidth.nim b/src/utils/strwidth.nim
index fe9df92d..90784890 100644
--- a/src/utils/strwidth.nim
+++ b/src/utils/strwidth.nim
@@ -52,7 +52,7 @@ func width*(s: string; start, len: int): int =
     fastRuneAt(s, i, r)
     result += r.twidth(result)
 
-func notwidth*(s: string): int =
+func notwidth*(s: openArray[char]): int =
   result = 0
   for r in s.runes:
     result += r.width()
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 3b10cf8c..0d65be50 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -124,7 +124,7 @@ func endsWithIgnoreCase*(s1, s2: string): bool =
       return false
   return true
 
-func skipBlanks*(buf: string; at: int): int =
+func skipBlanks*(buf: openArray[char]; at: int): int =
   result = at
   while result < buf.len and buf[result] in AsciiWhitespace:
     inc result
@@ -386,7 +386,7 @@ func percentDecode*(input: string; si = 0): string =
         i += 2
     inc i
 
-func htmlEscape*(s: string): string =
+func htmlEscape*(s: openArray[char]): string =
   result = ""
   for c in s:
     case c