- Author
- prussell Parse a string around whitespace or another specified delimiter Get full array of parsed strings or individual values by index, parsed to various types
| broad.core.parser.StringParser.StringParser |
( |
| ) |
|
| double broad.core.parser.StringParser.asDouble |
( |
int |
index | ) |
|
Gets the token at specified position and parses to a double
- Parameters
-
- Returns
- the desired token as a double
| float broad.core.parser.StringParser.asFloat |
( |
int |
index | ) |
|
Gets the token at specified position and parses to a float
- Parameters
-
- Returns
- the desired token as a float
| int broad.core.parser.StringParser.asInt |
( |
int |
index | ) |
|
Gets the token at specified position and parses to an int
- Parameters
-
- Returns
- the desired token as an int
| long broad.core.parser.StringParser.asLong |
( |
int |
index | ) |
|
Gets the token at specified position and parses to a long
- Parameters
-
- Returns
- the desired token as an int
| String broad.core.parser.StringParser.asString |
( |
int |
index | ) |
|
Gets the token at specified position
- Parameters
-
- Returns
- the desired token as a String
| void broad.core.parser.StringParser.clear |
( |
| ) |
|
| static String broad.core.parser.StringParser.firstField |
( |
String |
s | ) |
|
|
static |
Get the first field of a whitespace-delimited string
- Parameters
-
- Returns
- The first field
| int broad.core.parser.StringParser.getFieldCount |
( |
| ) |
|
Get number of fields
- Returns
- number of fields
| int broad.core.parser.StringParser.getIndexFor |
( |
String |
string | ) |
|
Get position of the string in array
- Parameters
-
- Returns
- The first position equal to the string
| String [] broad.core.parser.StringParser.getStringArray |
( |
| ) |
|
Gets the array of tokens
- Returns
- all the parsed tokens as a String[]
| static String [] broad.core.parser.StringParser.getTokens |
( |
String |
s | ) |
|
|
static |
Parses the string around whitespace and stores tokens
- Parameters
-
- Returns
- Tokens
| void broad.core.parser.StringParser.parse |
( |
String |
s | ) |
|
Parses the string around whitespace and stores tokens
- Parameters
-
| void broad.core.parser.StringParser.parse |
( |
String |
s, |
|
|
String |
regexp |
|
) |
| |
Parses the string around the specified delimiter and stores tokens
- Parameters
-
| s | The string to parse |
| regexp | Regular expression for delimiter (for period use "\\.") |
The documentation for this class was generated from the following file: