类 StringUtils

java.lang.Object
org.cattleframework.utils.auxiliary.StringUtils

public final class StringUtils extends Object
文本工具
作者:
orange
  • 方法详细资料

    • replaceOnce

      public static String replaceOnce(String template, String placeholder, String replacement)
    • equals

      public static boolean equals(CharSequence cs1, CharSequence cs2)
    • replace

      public static String replace(String template, String placeholder, String replacement)
    • replace

      public static String replace(String template, String placeholder, String replacement, boolean wholeWords)
    • getRandomString

      public static String getRandomString(int length)
    • getRandomString

      public static String getRandomString(boolean onlyNumber, int length)
    • isMatch

      public static boolean isMatch(String s, String p)
      字符串是否匹配(通配符匹配,?代表任意一位 *代表0-N位)
      参数:
      s - 被匹配字符串
      p - 匹配字符串
      返回:
      是否匹配
    • getHashName

      public static String getHashName(String str)
    • hyphen2Camel

      public static String hyphen2Camel(String str)
    • camel2Hyphen

      public static String camel2Hyphen(String str)