diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/seqs_v2.nim | 2 | ||||
-rw-r--r-- | lib/system/strs_v2.nim | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/system/seqs_v2.nim b/lib/system/seqs_v2.nim index ee8f2d67e..d6b26493c 100644 --- a/lib/system/seqs_v2.nim +++ b/lib/system/seqs_v2.nim @@ -178,7 +178,7 @@ proc newSeq[T](s: var seq[T], len: Natural) = shrink(s, 0) setLen(s, len) -proc sameSeqPayload(x: pointer, y: pointer): bool {.compilerproc, inline.} = +proc sameSeqPayload(x: pointer, y: pointer): bool {.compilerRtl, inl.} = result = cast[ptr NimRawSeq](x)[].p == cast[ptr NimRawSeq](y)[].p diff --git a/lib/system/strs_v2.nim b/lib/system/strs_v2.nim index 5e4cda186..dbee10777 100644 --- a/lib/system/strs_v2.nim +++ b/lib/system/strs_v2.nim @@ -209,6 +209,9 @@ proc nimAddStrV1(s: var NimStringV2; src: NimStringV2) {.compilerRtl, inl.} = proc nimDestroyStrV1(s: NimStringV2) {.compilerRtl, inl.} = frees(s) +proc nimStrAtLe(s: string; idx: int; ch: char): bool {.compilerRtl, inl.} = + result = idx < s.len and s[idx] <= ch + func capacity*(self: string): int {.inline.} = ## Returns the current capacity of the string. # See https://github.com/nim-lang/RFCs/issues/460 |