Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## avrora.util
Class StringUtil

    java.lang.Object
      avrora.util.StringUtil

public class StringUtil
extends java.lang.Object

The `StringUtil` class implements several useful functions for dealing with strings such as parsing pieces of syntax, formatting, etc.

Field Summary
`static java.lang.String` | `COMMA`
`static java.lang.String` | `COMMA_SPACE`
`static java.lang.String[]` | `EMPTY_STRING_ARRAY`
`static char[]` | `HEX_CHARS`
`static java.lang.String` | `LPAREN`
`static java.lang.String` | `QUOTE`
`static java.lang.String` | `RPAREN`
`static int` | `SECS_PER_DAY`
`static int` | `SECS_PER_HOUR`
`static int` | `SECS_PER_MIN`
`static java.lang.String` | `SQUOTE`

Constructor Summary
`StringUtil()`

Method Summary
`static char` | `alpha(int num)`
`static java.lang.String` | `commalist(java.lang.Object o1, java.lang.Object o2)`
`static java.lang.String` | `commalist(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)`
`static java.lang.String` | `commalist(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3, java.lang.Object o4)`
`static java.lang.String` | `dup(char c, int len)`
`static java.lang.String` | `embed(java.lang.Object s)`
`static java.lang.String` | `embed(java.lang.Object lead, java.lang.Object arg)`
`static java.lang.String` | `embed(java.lang.Object lead, java.lang.Object arg1, java.lang.Object arg2)`
`static java.lang.String` | `embed(java.lang.Object lead, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)`
`static java.lang.String` | `embed(java.lang.Object lead, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)`
`static char` | `evaluateCharLiteral(java.lang.String literal)`
`static int` | `evaluateIntegerLiteral(java.lang.String val)`
`static java.lang.String` | `evaluateStringLiteral(java.lang.String literal)`
`static int` | `hexValueOf(char c)`
`static java.lang.String` | `interval(int low, int high)`
`static boolean` | `isHexDigit(char c)`
`static boolean` | `isOctalDigit(char c)`
`static java.lang.String` | `leftJustify(float v, int width)`
`static java.lang.String` | `leftJustify(long v, int width)`
`static java.lang.String` | `leftJustify(java.lang.String s, int width)`
`static java.lang.String` | `makeJustifiedLines(java.lang.String s, int indent, int width)`
`static java.lang.String` | `makeParagraphs(java.lang.String s, int indent, int width)`
`static java.lang.String` | `milliAsString(long millis)`
`static int` | `octalValueOf(char c)`
`static char` | `peek(java.text.CharacterIterator i)`
`static boolean` | `peekAndEat(java.text.CharacterIterator i, char c)`
`static java.lang.String` | `qembed(java.lang.String s1, java.lang.String s2, java.lang.String s3)`
`static java.lang.String` | `quote(java.lang.Object s)`
`static int` | `readDecimalValue(java.text.CharacterIterator i, int max_chars)`
`static java.lang.String` | `readDotIdentifier(java.text.CharacterIterator i)`
`static int` | `readHexValue(java.text.CharacterIterator i, int max_chars)`
`static java.lang.String` | `readIdentifier(java.text.CharacterIterator i)`
`static int` | `readOctalValue(java.text.CharacterIterator i, int max_chars)`
`static java.lang.String` | `rightJustify(float v, int width)`
`static java.lang.String` | `rightJustify(long v, int width)`
`static java.lang.String` | `rightJustify(java.lang.String s, int width)`
`static void` | `skipToCharacter(java.text.CharacterIterator i, char c)`
`static void` | `skipWhiteSpace(java.text.CharacterIterator i)`
`static java.lang.String` | `squote(char c)`
`static java.lang.String` | `toHex(long value, int width)`
`static java.lang.String` | `trimallquotes(java.lang.String s)`
`static java.lang.String` | `trimquotes(java.lang.String s)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HEX_CHARS

    public static char[] HEX_CHARS

### QUOTE

    public static final java.lang.String QUOTE

### SQUOTE

    public static final java.lang.String SQUOTE

### LPAREN

    public static final java.lang.String LPAREN

### RPAREN

    public static final java.lang.String RPAREN

### COMMA

    public static final java.lang.String COMMA

### COMMA_SPACE

    public static final java.lang.String COMMA_SPACE

### EMPTY_STRING_ARRAY

    public static java.lang.String[] EMPTY_STRING_ARRAY

### SECS_PER_DAY

    public static int SECS_PER_DAY

### SECS_PER_HOUR

    public static int SECS_PER_HOUR

### SECS_PER_MIN

    public static int SECS_PER_MIN

Constructor Detail

### StringUtil

    public StringUtil()

Method Detail

### readIdentifier

    public static java.lang.String readIdentifier(java.text.CharacterIterator i)

### readDotIdentifier

    public static java.lang.String readDotIdentifier(java.text.CharacterIterator i)

### readHexValue

    public static int readHexValue(java.text.CharacterIterator i,
                                   int max_chars)

### readOctalValue

    public static int readOctalValue(java.text.CharacterIterator i,
                                     int max_chars)

### readDecimalValue

    public static int readDecimalValue(java.text.CharacterIterator i,
                                       int max_chars)

### skipWhiteSpace

    public static void skipWhiteSpace(java.text.CharacterIterator i)

### skipToCharacter

    public static void skipToCharacter(java.text.CharacterIterator i,
                                       char c)

### peek

    public static char peek(java.text.CharacterIterator i)

### peekAndEat

    public static boolean peekAndEat(java.text.CharacterIterator i,
                                     char c)

### isHexDigit

    public static boolean isHexDigit(char c)

### hexValueOf

    public static int hexValueOf(char c)

### octalValueOf

    public static int octalValueOf(char c)

### isOctalDigit

    public static boolean isOctalDigit(char c)

### rightJustify

    public static java.lang.String rightJustify(long v,
                                                int width)

### rightJustify

    public static java.lang.String rightJustify(float v,
                                                int width)

### rightJustify

    public static java.lang.String rightJustify(java.lang.String s,
                                                int width)

### leftJustify

    public static java.lang.String leftJustify(long v,
                                               int width)

### leftJustify

    public static java.lang.String leftJustify(float v,
                                               int width)

### leftJustify

    public static java.lang.String leftJustify(java.lang.String s,
                                               int width)

### milliAsString

    public static java.lang.String milliAsString(long millis)

### toHex

    public static java.lang.String toHex(long value,
                                         int width)

### quote

    public static java.lang.String quote(java.lang.Object s)

### squote

    public static java.lang.String squote(char c)

### embed

    public static java.lang.String embed(java.lang.Object s)

### embed

    public static java.lang.String embed(java.lang.Object lead,
                                         java.lang.Object arg)

### embed

    public static java.lang.String embed(java.lang.Object lead,
                                         java.lang.Object arg1,
                                         java.lang.Object arg2)

### embed

    public static java.lang.String embed(java.lang.Object lead,
                                         java.lang.Object arg1,
                                         java.lang.Object arg2,
                                         java.lang.Object arg3)

### embed

    public static java.lang.String embed(java.lang.Object lead,
                                         java.lang.Object arg1,
                                         java.lang.Object arg2,
                                         java.lang.Object arg3,
                                         java.lang.Object arg4)

### commalist

    public static java.lang.String commalist(java.lang.Object o1,
                                             java.lang.Object o2)

### commalist

    public static java.lang.String commalist(java.lang.Object o1,
                                             java.lang.Object o2,
                                             java.lang.Object o3)

### commalist

    public static java.lang.String commalist(java.lang.Object o1,
                                             java.lang.Object o2,
                                             java.lang.Object o3,
                                             java.lang.Object o4)

### interval

    public static java.lang.String interval(int low,
                                            int high)

### alpha

    public static char alpha(int num)

### qembed

    public static java.lang.String qembed(java.lang.String s1,
                                          java.lang.String s2,
                                          java.lang.String s3)

### evaluateIntegerLiteral

    public static int evaluateIntegerLiteral(java.lang.String val)

### evaluateStringLiteral

    public static java.lang.String evaluateStringLiteral(java.lang.String literal)

### evaluateCharLiteral

    public static char evaluateCharLiteral(java.lang.String literal)

### trimallquotes

    public static java.lang.String trimallquotes(java.lang.String s)

### trimquotes

    public static java.lang.String trimquotes(java.lang.String s)

### makeJustifiedLines

    public static java.lang.String makeJustifiedLines(java.lang.String s,
                                                      int indent,
                                                      int width)

### makeParagraphs

    public static java.lang.String makeParagraphs(java.lang.String s,
                                                  int indent,
                                                  int width)

### dup

    public static java.lang.String dup(char c,
                                       int len)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD