allow string insert in nimscript, fixes #10561

This commit is contained in:
narimiran 2019-02-15 11:09:32 +01:00
commit 1eaa18fe84

View file

@ -3873,7 +3873,7 @@ when false:
macro payload: typed {.gensym.} = blk macro payload: typed {.gensym.} = blk
payload() payload()
when hasAlloc: when hasAlloc or defined(nimscript):
proc insert*(x: var string, item: string, i = 0.Natural) {.noSideEffect.} = proc insert*(x: var string, item: string, i = 0.Natural) {.noSideEffect.} =
## inserts `item` into `x` at position `i`. ## inserts `item` into `x` at position `i`.
var xl = x.len var xl = x.len