Added inline pragmas.
This commit is contained in:
parent
d8480c73b6
commit
2f16854d0f
1 changed files with 2 additions and 2 deletions
|
|
@ -862,7 +862,7 @@ proc startsWith*(s, prefix: string): bool {.noSideEffect,
|
||||||
if s[i] != prefix[i]: return false
|
if s[i] != prefix[i]: return false
|
||||||
inc(i)
|
inc(i)
|
||||||
|
|
||||||
proc startsWith*(s: string, prefix: char): bool {.noSideEffect.} =
|
proc startsWith*(s: string, prefix: char): bool {.noSideEffect, inline.} =
|
||||||
## Returns true iff ``s`` starts with ``prefix``.
|
## Returns true iff ``s`` starts with ``prefix``.
|
||||||
result = s[0] == prefix
|
result = s[0] == prefix
|
||||||
|
|
||||||
|
|
@ -878,7 +878,7 @@ proc endsWith*(s, suffix: string): bool {.noSideEffect,
|
||||||
inc(i)
|
inc(i)
|
||||||
if suffix[i] == '\0': return true
|
if suffix[i] == '\0': return true
|
||||||
|
|
||||||
proc endsWith*(s: string, suffix: char): bool {.noSideEffect.} =
|
proc endsWith*(s: string, suffix: char): bool {.noSideEffect, inline.} =
|
||||||
## Returns true iff ``s`` ends with ``suffix``.
|
## Returns true iff ``s`` ends with ``suffix``.
|
||||||
result = s[s.high] == suffix
|
result = s[s.high] == suffix
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue