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)); }
// 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 }