diff options
author | bptato <nincsnevem662@gmail.com> | 2024-09-07 18:00:44 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-09-23 13:07:17 +0200 |
commit | 3b3d517130bb42ec69e6f684510e3b3a3668947c (patch) | |
tree | 50dc93511597ad91b88ef3e37d8f2cb780a18c70 /src/utils/twtstr.nim | |
parent | 080493c058f52a5c20638f1b975d032af45f4d3f (diff) | |
download | chawan-3b3d517130bb42ec69e6f684510e3b3a3668947c.tar.gz |
term: refactor
* reduce copies & allocations * simplify SGR generation
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r-- | src/utils/twtstr.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 48ea8750..46787553 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -105,6 +105,9 @@ func toHexLower*(u: uint16): string = x = x shr 4 return s +proc add*(s: var string; u: uint8) = + s.addInt(uint64(u)) + func equalsIgnoreCase*(s1, s2: string): bool {.inline.} = return s1.cmpIgnoreCase(s2) == 0 |