List of utility methods to do String Split by Line
List | splitToLines(final String str) split To Lines if (str == null || str.length() == 0) { return Collections.<String>emptyList(); final String[] strarray = str.split("\\n"); for (int i = 0; i < strarray.length; i++) { strarray[i] = strarray[i].replace("\t", " "); return Arrays.asList(strarray); ... |
String[] | splitToPairs(String Line) split To Pairs Line = Line.replace(" + ", ", "); ArrayList<String> result = new ArrayList<>(); boolean foundQwote = false; String pair = ""; for (int idx = 0; idx < Line.length(); idx++) { if (Line.charAt(idx) == '"') { foundQwote = !foundQwote; } else if (Line.charAt(idx) == ',') { ... |
List | stringSplit(String line, String delimiter) reads line from reader file and parses it on a delimiter and returns array of cells. return stringSplit(line, delimiter, null);
|