Here you can find the source of split(String str, String regexDelim, int limitUseRegex)
Parameter | Description |
---|---|
limitUseRegex | limit use regex |
regexDelim | the regex delim |
str | the str |
public static List<String> split(String str, String regexDelim, int limitUseRegex)
//package com.java2s; /*/*from w w w . j a v a 2 s . com*/ * Copyright ? WebServices pour l'?ducation, 2014 * * This file is part of ENT Core. ENT Core is a versatile ENT engine based on the JVM. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation (version 3 of the License). * * For the sake of explanation, any module that communicate over native * Web protocols, such as HTTP, with ENT Core is outside the scope of this * license and could be license under its own terms. This is merely considered * normal use of ENT Core, and does not fall under the heading of "covered work". * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ import java.util.Arrays; import java.util.List; public class Main { /** * Cutting a character string following a delimiter. * * @param regexDelim the regex delim * @param str the str * * @return the list<string> */ public static List<String> split(String str, String regexDelim) { return Arrays.asList(str.split(regexDelim)); } /** * Cutting a character string following a delimiter, with a limited use of delimiter "limitUseRegex" times. * * @param limitUseRegex limit use regex * @param regexDelim the regex delim * @param str the str * * @return the list<string> */ public static List<String> split(String str, String regexDelim, int limitUseRegex) { return Arrays.asList(str.split(regexDelim, limitUseRegex)); } }