public class ErddapString2
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ERROR
ERROR is a constant so that it will be consistent, so that one can
search for it in output files.
|
Constructor and Description |
---|
ErddapString2() |
Modifier and Type | Method and Description |
---|---|
static int |
indexOf(char[] cArray,
char c,
int fromIndex)
Finds the first instance of c at or after fromIndex (0..
|
static boolean |
isDigit(int c)
0..9.
|
static boolean |
isLetter(int c)
This includes hiASCII/ISO Latin 1/ISO 8859-1, but not extensive unicode characters.
|
static double |
parseDouble(java.lang.String s)
Convert a string to a double.
|
static int |
parseInt(java.lang.String s)
Convert a string to an int.
|
static long |
parseLong(java.lang.String s)
This converts String representation of a long.
|
static java.lang.String |
replaceAll(java.lang.String s,
char oldCh,
char newCh)
Returns a string where all occurences of oldCh have
been replaced with newCh.
|
static int[] |
toRational(double d)
This converts a double to a rational number (m * 10^t).
|
public static java.lang.String ERROR
public static int indexOf(char[] cArray, char c, int fromIndex)
cArray
- c
- the char you want to findfromIndex
- the index number of the position to start the searchpublic static boolean isLetter(int c)
c
- a charpublic static boolean isDigit(int c)
c
- a charpublic static java.lang.String replaceAll(java.lang.String s, char oldCh, char newCh)
public static int parseInt(java.lang.String s)
s
- is the String representation of a number.public static double parseDouble(java.lang.String s)
s
- is the String representation of a number.public static long parseLong(java.lang.String s)
s
- a valid String representation of a long valuepublic static int[] toRational(double d)
d
-