aboutsummaryrefslogtreecommitdiff
path: root/src/lustre-escape.ffi.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lustre-escape.ffi.mjs')
-rw-r--r--src/lustre-escape.ffi.mjs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lustre-escape.ffi.mjs b/src/lustre-escape.ffi.mjs
new file mode 100644
index 0000000..4ef05be
--- /dev/null
+++ b/src/lustre-escape.ffi.mjs
@@ -0,0 +1,11 @@
+export function slice(string, from, len) {
+ return string.slice(from, from + len);
+}
+
+export function first(string) {
+ return string.slice(0, 1);
+}
+
+export function drop_first(string) {
+ return string.slice(1);
+}