cleaner toArray magic

This commit is contained in:
Andreas Rumpf
2016-02-05 17:47:08 +01:00
parent 9b44ca17c2
commit 4686f485a6
2 changed files with 25 additions and 22 deletions

View File

@@ -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))