cleaner toArray magic
This commit is contained in:
parent
9b44ca17c2
commit
4686f485a6
2 changed files with 25 additions and 22 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue