diff options
Diffstat (limited to 'lib/pure/strutils.nim')
-rw-r--r-- | lib/pure/strutils.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 2f2b89955..b39d3b691 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -776,7 +776,8 @@ proc countLines*(s: string): int {.noSideEffect, ## ## In this context, a line is any string seperated by a newline combination. ## A line can be an empty string. - var i = 1 + result = 1 + var i = 0 while i < s.len: case s[i] of '\c': |