feat(tvix/eval): add builtins.replaceStrings

Change-Id: I93dcdaeb101364ee2273bcaeb19acb57cf6b9e7d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7034
Autosubmit: j4m3s <james.landrein@gmail.com>
Reviewed-by: Adam Joseph <adam@westernsemico.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
James Landrein 2022-10-25 13:56:14 +02:00 committed by clbot
parent 3aec678679
commit ccab9c06a2
5 changed files with 77 additions and 0 deletions

View file

@ -1 +0,0 @@
[ "faabar" "fbar" "fubar" "faboor" "fubar" "XaXbXcX" "X" "a_b" ]

View file

@ -1,11 +0,0 @@
with builtins;
[ (replaceStrings ["o"] ["a"] "foobar")
(replaceStrings ["o"] [""] "foobar")
(replaceStrings ["oo"] ["u"] "foobar")
(replaceStrings ["oo" "a"] ["a" "oo"] "foobar")
(replaceStrings ["oo" "oo"] ["u" "i"] "foobar")
(replaceStrings [""] ["X"] "abc")
(replaceStrings [""] ["X"] "")
(replaceStrings ["-"] ["_"] "a-b")
]