edu.mayo.bsi.ngsportal.shared
Class SplitFile
java.lang.Object
edu.mayo.bsi.ngsportal.shared.SplitFile
public class SplitFile
- extends Object
- Author:
- Greg Dougherty
|
Field Summary |
static int |
kReturnAll
Constant to say want String.split to find every possible split in a String. |
|
Method Summary |
static String[] |
mySplit(String target,
String split,
int maxCol)
Return an array of strings split on the string split. |
kReturnAll
public static final int kReturnAll
- Constant to say want String.split to find every possible split in a String.
- See Also:
- Constant Field Values
SplitFile
public SplitFile()
mySplit
public static final String[] mySplit(String target,
String split,
int maxCol)
- Return an array of strings split on the string split. Unlike the String
class version of this function, split is not treated as a regular expression
- Parameters:
target - string to split upsplit - string with which to do the splittingmaxCol - maximum number of columns to return. -1 to return all
- Returns:
- an empty array if target is length 0, otherwise an array with
n + 1 strings, where n is the number of occurrences of split.
Will only return n strings if the final occurrence of split is at the
end of target.