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-18 20:14:43 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-18 20:14:43 +0200
commit6f391e31a8b8298f16e1812c118616a84eb9b849 (patch)
treeafc3402955359b6526b82ce6b77fe57e9c0b20c7 /src/utils/twtstr.nim
parent0bc76d47ac558896c9027727f9de0b4b262f6e24 (diff)
downloadchawan-6f391e31a8b8298f16e1812c118616a84eb9b849.tar.gz
twtstr: remove unused functions
lineedit no longer needs these
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r--src/utils/twtstr.nim22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index cd85d45c..c0b68178 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -185,11 +185,6 @@ func equalsIgnoreCase*(s1, s2: string): bool {.inline.} =
 func isDigitAscii*(r: Rune): bool =
   return int(r) < 256 and isDigit(char(r))
 
-func substr*(s: seq[Rune], i, j: int): seq[Rune] =
-  if s.len == 0:
-    return @[]
-  return s[min(high(s), i)..min(high(s), j - 1)]
-
 func stripAndCollapse*(s: string): string =
   var i = 0
   while i < s.len and s[i] in AsciiWhitespace:
@@ -1018,27 +1013,10 @@ func width*(s: string, start, len: int): int =
     fastRuneAt(s, i, r)
     result += r.twidth(result)
 
-func width*(s: seq[Rune]): int =
-  for r in s:
-    result += r.twidth(result)
-
 func notwidth*(s: string): int =
   for r in s.runes:
     result += r.width()
 
-func width*(s: seq[Rune], min, max: int): int =
-  var i = min
-  var mi = min(max, s.len)
-  while i < mi:
-    result += s[i].twidth(result)
-    inc i
-
-func width*(s: seq[Rune], min: int): int =
-  var i = min
-  while i < s.len:
-    result += s[i].twidth(result)
-    inc i
-
 func twidth*(s: string, w: int): int =
   var i = w
   for r in s.runes():
ben@gbmor.dev> 2019-08-30 19:17:16 -0400 committer Ben Morrison <ben@gbmor.dev> 2019-08-30 19:18:26 -0400 moved some functionality to module, added tests' href='/gbmor/clinte/commit/src/posts.rs?h=v0.4.1&id=d098a93d910f4bb23e4f0f81a69db83693dd2b78'>d098a93 ^
d098a93 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103