示例#1
0
        // pnyx -e=documentation pncs.cmd.examples.documentation.library.ExampleLine rowConverter
        public static void rowConverter()
        {
            const String input = "set x := (set == 0 ? 0 : 100 / set)";

            using (Pnyx p = new Pnyx())
            {
                p.readString(input);
                p.lineToRow(new ExampleRowConverter());
                p.withColumns(p2 => p2.sed("set[ ]*", "var ", "i"), 1); // replace set from first column
                p.writeStdout();                                        // internally converts back to line
            }
            // outputs: var x := (set == 0 ? 0 : 100 / set)
        }