Class sunsoft.jws.visual.rt.type.ListParser
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.type.ListParser
java.lang.Object
|
+----sunsoft.jws.visual.rt.type.ListParser
- public class ListParser
- extends Object
Utility class for parsing lists of things in the style of Tcl.
-
ListParser(String)
-
-
ListParser(String, int)
-
-
ListParser(String, int, int)
-
-
elements()
-
-
getListElements(String, int)
-
-
indent(StringBuffer, int)
- Indents "buf" based on the given indent level.
-
isdigit(char)
-
-
isxdigit(char)
-
-
list(String)
-
-
list(String, StringBuffer)
-
-
makeListTable(String)
-
-
newline()
- Returns a string that can be used as a newline.
-
newline(StringBuffer)
- Appends a newline to buf.
-
parseInt(String)
-
-
quote(char[], boolean)
- Puts quotes around the given character array if it contains spaces
or double-quotes.
-
quote(String, boolean)
-
-
quote(String, StringBuffer, boolean)
-
-
size()
-
ListParser
public ListParser(String str)
ListParser
public ListParser(String str,
int offset)
ListParser
public ListParser(String str,
int begin,
int end)
elements
public Enumeration elements()
size
public int size()
list
public static String list(String string)
list
public static void list(String string,
StringBuffer buf)
quote
public static String quote(String string,
boolean forceQuotes)
quote
public static void quote(String string,
StringBuffer buf,
boolean forceQuotes)
quote
public static char[] quote(char src[],
boolean forceQuotes)
- Puts quotes around the given character array if it contains spaces
or double-quotes. Only part of the string buffer is quoted, determined
by the "startIndex" argument. The substring of the buffer starting
at "startIndex" and ending at the end of the buffer is quoted.
This method operates on a string buffer instead of a string for
improved performance.
The "quote" method also does escaping. A backslash is placed in
front of any double-quote or backslash in the string itself. Also,
new-line characters are replaced with the characters \ and n
Added argument: forceQuotes. If this is true, then always put quotes
around the text (necessary for code generation). Also, replace the
'\n' character with the string "\n".
newline
public static String newline()
- Returns a string that can be used as a newline. This string includes
a carriage return if we are running on Windows.
newline
public static void newline(StringBuffer buf)
- Appends a newline to buf. This also appends a carriage return
if we are running on Windows.
indent
public static void indent(StringBuffer buf,
int indentLevel)
- Indents "buf" based on the given indent level.
isdigit
public static boolean isdigit(char ch)
isxdigit
public static boolean isxdigit(char ch)
getListElements
public static Enumeration getListElements(String s,
int mult)
makeListTable
public static Hashtable makeListTable(String s)
parseInt
public static int parseInt(String s)
All Packages Class Hierarchy This Package Previous Next Index