first example with virtual dom; virtual dom still buggy
This commit is contained in:
commit
4d72d5a999
8 changed files with 638 additions and 0 deletions
12
jstrutils.nim
Normal file
12
jstrutils.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# cstring handling utilities for performance
|
||||
|
||||
proc split*(s, sep: cstring): seq[cstring] {.importcpp, nodecl.}
|
||||
|
||||
proc startsWith*(a, b: cstring): bool {.importcpp: "startsWith", nodecl.}
|
||||
proc contains*(a, b: cstring): bool {.importcpp: "(#.indexOf(#)>=0)", nodecl.}
|
||||
proc substr*(s: cstring; start: int): cstring {.importcpp: "substr", nodecl.}
|
||||
proc substr*(s: cstring; start, length: int): cstring {.importcpp: "substr", nodecl.}
|
||||
|
||||
#proc len*(s: cstring): int {.importcpp: "#.length", nodecl.}
|
||||
proc `&`*(a, b: cstring): cstring {.importcpp: "(# + #)", nodecl.}
|
||||
proc toCstr*(s: int): cstring {.importcpp: "((#)+'')", nodecl.}
|
||||
Loading…
Add table
Add a link
Reference in a new issue