openarray/varargs split; breaks bootstrapping
This commit is contained in:
parent
1215193010
commit
0171566c98
29 changed files with 228 additions and 175 deletions
|
|
@ -1112,6 +1112,13 @@ proc `%` *(formatstr, a: string): string {.noSideEffect,
|
|||
## This is the same as ``formatstr % [a]``.
|
||||
result = newStringOfCap(formatstr.len + a.len)
|
||||
addf(result, formatstr, [a])
|
||||
|
||||
proc format*(formatstr: string, a: varargs[string, `$`]): string {.noSideEffect,
|
||||
rtl, extern: "nsuFormatVarargs".} =
|
||||
## This is the same as ``formatstr % a`` except that it supports
|
||||
## auto stringification.
|
||||
result = newStringOfCap(formatstr.len + a.len)
|
||||
addf(result, formatstr, a)
|
||||
|
||||
{.pop.}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue