public void KeepOnlyChars() { foreach (string s in InputTextList) { foreach (char c in s) { if (!ParsingCharacters.Contains(c) && c != '\n' && c != '\r') { ChangedChars.Add(c); ChangedStrings.Add(s); continue; } } } OutputText = ""; foreach (char c in InputText) { if (ParsingCharacters.Contains(c) || c == '\n' || c == '\r') { OutputText = OutputText + c; } } }
public void RemoveCharacters() { foreach (char c in ParsingCharacters) { foreach (string s in InputTextList) { if (s.Contains(c)) { ChangedChars.Add(c); ChangedStrings.Add(s); } } } OutputText = InputText; foreach (char c in ParsingCharacters) { OutputText = OutputText.Replace(c.ToString(), ""); } }