mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-17 22:41:14 +00:00
cleaner toArray magic
This commit is contained in:
@@ -31,7 +31,7 @@ proc strtr*(s: string, replacePairs: PhpArray[string, string]): string {.importc
|
||||
proc strtr*(s, fromm, to: string): string {.importc.}
|
||||
|
||||
proc toArray*[K,V](pairs: openarray[(K,V)]): PhpArray[K,V] {.magic:
|
||||
"Repr".}
|
||||
"Array".}
|
||||
template strtr*(s: string, replacePairs: openarray[(string, string)]): string =
|
||||
strtr(toArray(replacePairs))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user