Candor.StringExtensions.TrimNotIn C# (CSharp) 메소드

TrimNotIn() 공개 정적인 메소드

Trims any characters from the start and end of a string that is not in the supplied list.
public static TrimNotIn ( this text, IList chars ) : string
text this The text to be scanned.
chars IList The characters to be kept, such as a LexicalCharacterSet characters list.
리턴 string
        public static string TrimNotIn(this string text, IList<char> chars)
        {
            return text.TrimEndNotIn(chars).TrimStartNotIn(chars);
        }