From a13a3f6a7125ee98e7dcd56d58662b790d0b4180 Mon Sep 17 00:00:00 2001 From: trustable-code Date: Sat, 17 Mar 2018 20:13:35 +0100 Subject: Remove countLines() and use fixed version in strutils --- src/nigui.nim | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src') diff --git a/src/nigui.nim b/src/nigui.nim index 6b50dee..e4f5d85 100755 --- a/src/nigui.nim +++ b/src/nigui.nim @@ -885,8 +885,6 @@ method realignChildControls(control: Control) method setControlPosition(container: Container, control: Control, x, y: int) -proc countLines(s: string): int - # ======================================================================================== # @@ -937,19 +935,6 @@ proc rgb(red, green, blue: byte, alpha: byte = 255): Color = result.blue = blue result.alpha = alpha -# Should removed here, when version in strutils is fixed -proc countLines(s: string): int = - result = 1 - var i = 0 - while i < s.len: - case s[i] - of '\c': - if s[i+1] == '\l': inc i - inc result - of '\l': inc result - else: discard - inc i - proc unicodeToUpper(unicode: int): int = if unicode < 128: return cast[int](cast[char](unicode).toUpper) -- cgit v1.2.3