// pnyx -e=documentation pncs.cmd.examples.documentation.library.ExampleStateMachine cat public static void cat() { using (Pnyx p = new Pnyx()) { p.cat(pn => { pn.readString("Line one"); pn.readString("Line two"); pn.readString("Line three"); // ... }); p.writeStdout(); } // outputs: // Line one // Line two // Line three }
public void catLine() { String actual; using (Pnyx p = new Pnyx()) { p.cat(pn => { pn.readString(EARTH); pn.readString(EARTH); }); actual = p.processToString(); } const String expected = @"Gaia,Terra,""Mother goddess of the earth"" Gaia,Terra,""Mother goddess of the earth"""; Assert.Equal(expected, actual); }
// pnyx -e=documentation pncs.cmd.examples.documentation.library.ExampleStateMachine catCsv public static void catCsv() { using (Pnyx p = new Pnyx()) { p.cat(p2 => { p2.asCsv(p3 => { p3.readString("Line,one"); p3.readString("Line,two"); p3.readString("Line,three"); }); }); p.selectColumns(2, 1); p.writeStdout(); } // outputs: // one,Line // two,Line // three,Line }