gnu.iou
Class templ
java.lang.Object
|
+--gnu.iou.templ
- public abstract class templ
- extends java.lang.Object
Parse input `String' text into lines, and then columns split by
"%name%" tokens.
For example, one line containing one special "%name%" token
would be parsed into three columns.
{"The ", "%quick%", " brown fox is famous."}
Instance object for generating output into during parsing of
"src".
- Author:
- John Pritchard (john@syntelos.org)
Constructor Summary |
templ()
|
Method Summary |
static void |
main(java.lang.String[] argv)
|
static java.lang.String[][] |
parse(java.lang.String text)
Parse text string into lines and columns. |
static java.lang.String[][] |
parse(java.lang.String text,
boolean validate)
|
static java.lang.String[][] |
parseValidate(java.lang.String text)
Parse as a template, returning null if there are no template
objects in the text. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
templ
public templ()
parseValidate
public static final java.lang.String[][] parseValidate(java.lang.String text)
- Parse as a template, returning null if there are no template
objects in the text.
parse
public static final java.lang.String[][] parse(java.lang.String text)
- Parse text string into lines and columns. One column per line
unless there are "%...%" tokens in the line, in which case the
"%...%" tokens are separated.
- Parameters:
text
- Text string
parse
public static final java.lang.String[][] parse(java.lang.String text,
boolean validate)
- Parameters:
text
- Template textvalidate
- If true, return null if there are no template tokens.
main
public static void main(java.lang.String[] argv)