mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
allow string insert in nimscript, fixes #10561
This commit is contained in:
@@ -3873,7 +3873,7 @@ when false:
|
||||
macro payload: typed {.gensym.} = blk
|
||||
payload()
|
||||
|
||||
when hasAlloc:
|
||||
when hasAlloc or defined(nimscript):
|
||||
proc insert*(x: var string, item: string, i = 0.Natural) {.noSideEffect.} =
|
||||
## inserts `item` into `x` at position `i`.
|
||||
var xl = x.len
|
||||
|
||||
Reference in New Issue
Block a user