コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
        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(), "");
            }
        }