mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
fixes #6832
This commit is contained in:
@@ -370,7 +370,7 @@ proc cmpIgnoreStyle*(a, b: string): int {.noSideEffect,
|
||||
return 1
|
||||
inc i
|
||||
inc j
|
||||
|
||||
{.pop.}
|
||||
|
||||
# --------- Private templates for different split separators -----------
|
||||
|
||||
@@ -1474,7 +1474,7 @@ proc endsWith*(s, suffix: string): bool {.noSideEffect,
|
||||
doAssert a.endsWith("dab") == false
|
||||
var i = 0
|
||||
var j = len(s) - len(suffix)
|
||||
while i+j <% s.len:
|
||||
while i+j >= 0 and i+j < s.len:
|
||||
if s[i+j] != suffix[i]: return false
|
||||
inc(i)
|
||||
if i >= suffix.len: return true
|
||||
@@ -2636,9 +2636,6 @@ proc format*(formatstr: string, a: varargs[string, `$`]): string {.noSideEffect,
|
||||
result = newStringOfCap(formatstr.len + a.len)
|
||||
addf(result, formatstr, a)
|
||||
|
||||
{.pop.}
|
||||
|
||||
|
||||
|
||||
proc strip*(s: string, leading = true, trailing = true,
|
||||
chars: set[char] = Whitespace): string
|
||||
|
||||
Reference in New Issue
Block a user