I have this string:
value1*value2*value3*value4
How would cut the String in multiple Strings?
string1 = value1;
string2 = value2;
etc...
My way (and probably not a very good way): I take an array with all the indexes of the "*" character and after that, I call the subString method to get what I need.
string valueString = "value1*value2*value3*value4";
var strings = valueString.Split('*');
string string1 = strings[0];
string string2 = strings[1];
...
More info here.
Try this
string string1 = "value1*value2*value3*value4";
var myStrings = string1.Split('*');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With