MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / explode

Method explode

src/main/java/util/StringUtils.java:209–225  ·  view source on GitHub ↗
(String text, char separator)

Source from the content-addressed store, hash-verified

207
208 /* Divide text to array of parts using separator character */
209 static public String[] explode(String text, char separator) {
210 if (text.equals("")) {
211 return new String[0];
212 }
213 Vector tmp = new Vector();
214 int start = 0;
215 int end = text.indexOf(separator, start);
216 while (end >= start) {
217 tmp.addElement(text.substring(start, end));
218 start = end + 1;
219 end = text.indexOf(separator, start);
220 }
221 tmp.addElement(text.substring(start));
222 String[] result = new String[tmp.size()];
223 tmp.copyInto(result);
224 return result;
225 }
226
227 public static Vector sortVectorOfString(Vector e) {
228 Vector v = new Vector();

Callers 1

encodeMethod · 0.95

Calls 3

addElementMethod · 0.80
equalsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected