Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            string[] strArr = new string[]
            {
                "1asrg   66dfgh00 123abc45",
                "111111    Empty  222222  777",
                "123456789test string765433456"
            };
            ConvertRule cr1 = new ConvertRule(RemoveDigits);

            cr1 += RemoveSpaces;
            for (int i = 0; i < strArr.Length; i++)
            {
                Console.WriteLine(cr1.Invoke(ref strArr[i]));
            }
        }
Ejemplo n.º 2
0
 public string Convert(string str, ConvertRule cr)
 {
     return(cr.Invoke(ref str));
 }
Ejemplo n.º 3
0
 public string MyConvert(string str, ConvertRule cr)
 {
     return(cr?.Invoke(str));
 }