public class StringSplitter extends SubString
It allows for more advanced splitting options than a SubString alone, and it can be reused using calls to getFirst().
| Modifier and Type | Field and Description |
|---|---|
boolean |
ignoreSeparatorInQuotes
This tells the splitter to ignore separators in quotes.
|
int |
max
This is the maximum index allowed into the source data string.
|
char |
separator
This tells is the separator being used to split the String.
|
BACKWARDS, data, IGNORE_CASE, length, start, STARTS_WITH| Constructor and Description |
|---|
StringSplitter(char separator,
boolean ignoreSeparatorInQuotes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getFirst(char[] data,
int offset,
int length)
Get the first substring in the String.
|
Object |
getNew()
This returns a new SubString().
|
boolean |
getNext()
Get the next substring in the String as specified in getFirst().
|
cache, cached, charAt, compare, compareTo, compareTo, copyInto, copyInto, copyInto, copyInto, endsWith, equals, getCached, getCopy, getStringChars, hashCode, indexOf, indexOf, indexOf, indexOf, indexOf, isNull, lastIndexOf, lastIndexOf, length, replace, set, set, set, set, set, split, split, split, split, startsWith, substring, substring, substring, toLowerCase, toString, toUpperCase, trim_getFieldType, _getSetField, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getMyFieldListpublic int max
public boolean ignoreSeparatorInQuotes
public char separator
public StringSplitter(char separator,
boolean ignoreSeparatorInQuotes)
public Object getNew()
SubStringpublic boolean getFirst(char[] data,
int offset,
int length)
data - the data to start spliting.offset - the offset into the data.length - the maximum length of the data.public boolean getNext()