diff options
Diffstat (limited to 'std/stdlib.sloth')
| -rw-r--r-- | std/stdlib.sloth | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/std/stdlib.sloth b/std/stdlib.sloth new file mode 100644 index 0000000..d7ddeff --- /dev/null +++ b/std/stdlib.sloth @@ -0,0 +1,17 @@ +foreign fn wait(x: Int) Void; +foreign fn print(str: String) Void; +foreign fn slen(str: String) Int; +foreign fn charAt(str: String) Char; +foreign fn parse_int(str: String) Int; + +fn termpos(x: int, y: int) Void { + print("\x1b["); + print(x); + print(";"); + print(y); + print("H"); +} + +fn termclear() Void { + print("\x1b[2J\x1b[H"); +} |
