about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--advent.tlv22
1 files changed, 22 insertions, 0 deletions
diff --git a/advent.tlv b/advent.tlv
index a801b11..61cf3d9 100644
--- a/advent.tlv
+++ b/advent.tlv
@@ -150,6 +150,28 @@ end
   {
     __teliva_timestamp = [==[
 original]==],
+    find_index = [==[
+function find_index(arr, x)
+  for n, y in q(arr) do
+    if x == y then
+      return n
+    end
+  end
+end
+]==],
+  },
+  {
+    __teliva_timestamp = [==[
+original]==],
+    trim = [==[
+function trim(s)
+  return s:gsub('^%s*', ''):gsub('%s*$', '')
+end
+]==],
+  },
+  {
+    __teliva_timestamp = [==[
+original]==],
     split = [==[
 function split(s, d)
   result = {}