How can I replace multiple chars in a string?
My current strategy is to nest the stdlib
functions:
tst.jsonnet:
local tst = '0-1.2';
{
tst: std.strReplace(std.strReplace(tst, '.', '_'), '-', '_'),
}
output:
> ./jsonnet tst.jsonnet
{
"tst": "0_1_2"
}
I would love to be able to use the function, something like:
std_name(tst, ['.', '-'], '_')