i have a string that comes in like:
string email = "[email protected], [email protected], [email protected]";
i want to split it into an array of strings
if i do this:
string[] emails = email.Split(',');
i get spaces in front of each email address (after the first one)
emails[0] = "[email protected]"
emails[1] = " [email protected]"
emails[2] = " [email protected]"
what is the best way to get this (either a better way to parse or a way to trim all strings in an array)?
emails[0] = "[email protected]"
emails[1] = "[email protected]"
emails[2] = "[email protected]"