diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-12-07 17:29:00 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-12-07 17:29:00 -0800 |
commit | de2152e313cc120728ca443146f36a85963a24df (patch) | |
tree | a621d766c5ffa77e836ed7d227dec0c0273c6080 | |
parent | 20373578f46e076cf5af29b4cd37c4d7029c54fd (diff) | |
download | teliva-de2152e313cc120728ca443146f36a85963a24df.tar.gz |
new primitive: string split
-rw-r--r-- | advent.tlv | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/advent.tlv b/advent.tlv index a1652ac..afbff19 100644 --- a/advent.tlv +++ b/advent.tlv @@ -133,6 +133,19 @@ end { __teliva_timestamp = [==[ original]==], + split = [==[ +function split(s, d) + result = {} + for match in (s..d):gmatch("(.-)"..d) do + table.insert(result, match); + end + return result +end +]==], + }, + { + __teliva_timestamp = [==[ +original]==], window = [==[ window = curses.stdscr()]==], }, |