示例#1
0
 public void ToTitleCase()
 {
     Assert.Equal("Jimbo", "JIMBO".toTitleCase());
     Assert.Equal("Jimbo", "Jimbo".toTitleCase());
     Assert.Equal("Jimbo", "jimbo".toTitleCase());
     Assert.Equal("Last, First", "last, first".toTitleCase());
     Assert.Null(NameUtil.toTitleCase(null));
 }
示例#2
0
        // pnyx -e=documentation pncs.cmd.examples.documentation.library.ExampleRow transformerFunc
        public static void transformerFunc()
        {
            const String input = @"Line one,KEEPER
Line two,LOSER
";

            using (Pnyx p = new Pnyx())
            {
                p.readString(input);
                p.parseCsv();
                p.rowTransformerFunc(x => new List <string> {
                    NameUtil.toTitleCase(x[1])
                });
                p.writeStdout();
            }
            // outputs:
            // Keeper
            // Loser
        }