moved isInt proc to jstrutils
This commit is contained in:
parent
b6d3d7821b
commit
fec9de14af
1 changed files with 5 additions and 0 deletions
|
|
@ -16,3 +16,8 @@ proc `&`*(s: int): cstring {.importcpp: "((#)+'')", nodecl.}
|
|||
proc `&`*(s: bool): cstring {.importcpp: "((#)+'')", nodecl.}
|
||||
|
||||
proc `&`*(s: cstring): cstring {.importcpp: "(#)", nodecl.}
|
||||
|
||||
proc isInt*(s: cstring): bool {.asmNoStackFrame.} =
|
||||
asm """
|
||||
return s.match(/^[0-9]+$/);
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue