类 StringUtils

java.lang.Object
net.minecraftforge.gradle.StringUtils

public final class StringUtils extends Object
  • 方法详细资料

    • lower

      public static String lower(String string)
    • fromUTF8Stream

      public static String fromUTF8Stream(InputStream stream) throws IOException
      抛出:
      IOException
    • lines

      public static com.google.common.collect.ImmutableList<String> lines(String text)
    • tokenizeToStringArray

      public static String[] tokenizeToStringArray(String str, String delimiters)
      Tokenize the given String into a String array via a StringTokenizer. Trims tokens and omits empty tokens.

      The given delimiters string is supposed to consist of any number of delimiter characters. Each of those characters can be used to separate tokens. A delimiter is always a single character; for multi-character delimiters, consider using delimitedListToStringArray

      Copied from the Spring Framework while retaining all license, copyright and author information.

      参数:
      str - the String to tokenize
      delimiters - the delimiter characters, assembled as String (each of those characters is individually considered as delimiter).
      返回:
      an array of the tokens
      另请参阅:
    • tokenizeToStringArray

      public static String[] tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens)
      Tokenize the given String into a String array via a StringTokenizer.

      The given delimiters string is supposed to consist of any number of delimiter characters. Each of those characters can be used to separate tokens. A delimiter is always a single character; for multi-character delimiters, consider using delimitedListToStringArray

      Copied from the Spring Framework while retaining all license, copyright and author information.

      参数:
      str - the String to tokenize
      delimiters - the delimiter characters, assembled as String (each of those characters is individually considered as delimiter)
      trimTokens - trim the tokens via String's trim
      ignoreEmptyTokens - omit empty tokens from the result array (only applies to tokens that are empty after trimming; StringTokenizer will not consider subsequent delimiters as token in the first place).
      返回:
      an array of the tokens (null if the input String was null)
      另请参阅:
    • toStringArray

      public static String[] toStringArray(Collection<String> collection)
      Copy the given Collection into a String array. The Collection must contain String elements only.

      Copied from the Spring Framework while retaining all license, copyright and author information.

      参数:
      collection - the Collection to copy
      返回:
      the String array (null if the passed-in Collection was null)