I have a string which looks like this:
'I want a {Crust} crust {Type} pizza'
{Crust} and {Type} are placeholders in the string and I would like to replace the {Crust} and {Type} value with their actual values which are of type string array.
Crust-
['Pan','Thin','Tossed']
Type-
['Veggie','Pepperoni']
Expected Output should be all possible combinations for values from the array like below:
I want a Pan crust Veggie pizza
I want a Thin crust Veggie pizza
I want a Tossed crust Veggie pizza
I want a Pan crust Pepperoni pizza
I want a Thin crust Pepperoni pizza
I want a Tossed crust Pepperoni pizza
I'm looking for a more generic solution since I can have more values in Crust and Type array. Also, there can be a new placeholder, for example {Delivery} which would be replaced by another array of string ['For here','To go'].