797 B
797 B
Claro Standard Library (Commands)
Claro’s “stdlib” is exposed as readable commands.
TEXT
Split
TEXT SPLIT "a,b,c" BY "," AS parts
Join
TEXT JOIN parts BY "-" AS out
Replace all
TEXT REPLACE "one two two" FROM "two" TO "three" AS out
PATH
Dirname
PATH DIRNAME "C:/games/save/file.txt" AS dir
Normalize
Unifies slashes and removes . / .. where possible:
PATH NORMALIZE "../data/./levels/../sprites" AS clean
Is absolute
PATH ISABS "/home/me/file.txt" AS isAbs
Exists
Checks if a file exists at the path:
PATH EXISTS "config.json" AS ok
TIME
Unix seconds
TIME NOW AS t
Unix milliseconds (coarse)
TIME NOWMS AS ms