MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / split

Method split

src/main/java/net/optifine/util/StrUtils.java:281–313  ·  view source on GitHub ↗
(String str, String separators)

Source from the content-addressed store, hash-verified

279 }
280
281 public static String[] split(String str, String separators)
282 {
283 if (str != null && str.length() > 0)
284 {
285 if (separators == null)
286 {
287 return new String[] {str};
288 }
289 else
290 {
291 List list = new ArrayList();
292 int i = 0;
293
294 for (int j = 0; j < str.length(); ++j)
295 {
296 char c0 = str.charAt(j);
297
298 if (equals(c0, separators))
299 {
300 list.add(str.substring(i, j));
301 i = j + 1;
302 }
303 }
304
305 list.add(str.substring(i, str.length()));
306 return (String[])((String[])list.toArray(new String[list.size()]));
307 }
308 }
309 else
310 {
311 return new String[0];
312 }
313 }
314
315 private static boolean equals(char ch, String matches)
316 {

Callers 15

loadLocaleDataMethod · 0.45
getNSMapLocationMethod · 0.45
splitDescriptionMethod · 0.45
loadLocaleDataMethod · 0.45
ResourceIndexMethod · 0.45
getResourceDomainsMethod · 0.45
channelRead0Method · 0.45
loadOptionsMethod · 0.45
loadOfOptionsMethod · 0.45
func_178062_aMethod · 0.45
drawScreenMethod · 0.45

Calls 5

equalsMethod · 0.95
lengthMethod · 0.80
addMethod · 0.45
toArrayMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected