Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static string RemoveInvalidCharacters(this string str, IEnumerable<char> invalidChars)
- {
- return invalidChars.Aggregate(str, (current, ch) => current.Replace(ch.ToString(), string.Empty));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement