From 3b3d517130bb42ec69e6f684510e3b3a3668947c Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 7 Sep 2024 18:00:44 +0200 Subject: term: refactor * reduce copies & allocations * simplify SGR generation --- src/utils/twtstr.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/utils/twtstr.nim') 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 -- cgit 1.4.1-2-gfad0