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:
parent
3aec678679
commit
ccab9c06a2
5 changed files with 77 additions and 0 deletions
|
|
@ -1 +0,0 @@
|
|||
[ "faabar" "fbar" "fubar" "faboor" "fubar" "XaXbXcX" "X" "a_b" ]
|
||||
|
|
@ -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")
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue