类 SplitUtil

java.lang.Object
com.tlcsdm.core.util.SplitUtil

public class SplitUtil extends Object
字符串分割工具.
作者:
unknowIfGuestInDream, Konloch
  • 构造器详细资料

    • SplitUtil

      public SplitUtil()
  • 方法详细资料

    • split

      public static String[] split(String s, String separator)
      Splits a String with a specified separator String.
      参数:
      s - any String
      separator - any String
      返回:
      a String array split on the separator supplied
    • split

      public static String[] split(String s, String separator, int maxAmount)
      Splits a String with a specified separator String.
      参数:
      s - any String
      separator - any String
      maxAmount - -1 for unlimited, or else the maximum size of results returned
      返回:
      a String array split on the separator supplied
    • split

      public static String[] split(String s, String separator, int maxAmount, boolean preserveSeparator)
      Splits a String with a specified separator String.
      参数:
      s - any String
      separator - any String
      maxAmount - -1 for unlimited, or else the maximum size of results returned
      preserveSeparator - if true it will include the separator at the end of each split line
      返回:
      a String array split on the separator supplied
    • split

      public static String[] split(String s, String separator, int maxAmount, boolean preserveSeparator, boolean allowEmptyResults)
      Splits a String with a specified separator String.
      参数:
      s - any String
      separator - any String
      maxAmount - -1 for unlimited, or else the maximum size of results returned
      preserveSeparator - if true it will include the separator at the end of each split line
      allowEmptyResults - is true the results will include empty results on repeating search parameters
      返回:
      a String array split on the separator supplied