类 StringUtil

java.lang.Object
org.apache.commons.lang3.StringUtils
plus.hiver.common.utils.StringUtil

public class StringUtil extends org.apache.commons.lang3.StringUtils
字符串工具类

尊重知识产权,CV 请保留版权,海文科技 https://hiver.cc 出品,不允许非法使用,后果自负

作者:
Yazhi Li
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final String
    随机数字
    static final String
    斜杠
    static final String
    随机字符

    从类继承的字段 org.apache.commons.lang3.StringUtils

    CR, EMPTY, INDEX_NOT_FOUND, LF, SPACE
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static boolean
    判断一个字符串是否为空串
    static boolean
    判断一个Collection是否为空, 包含List,Set,Queue
    static boolean
    判断一个字符串是否为非空串
    static boolean
    isNull(Object object)
    判断一个对象是否为空
    static String
    randomDigit(int n)
    得到随机数字
    static String
    randomStr(int n)
    得到随机字符

    从类继承的方法 org.apache.commons.lang3.StringUtils

    abbreviate, abbreviate, abbreviate, abbreviate, abbreviateMiddle, appendIfMissing, appendIfMissingIgnoreCase, capitalize, center, center, center, chomp, chomp, chop, compare, compare, compareIgnoreCase, compareIgnoreCase, contains, contains, containsAny, containsAny, containsAny, containsAnyIgnoreCase, containsIgnoreCase, containsNone, containsNone, containsOnly, containsOnly, containsWhitespace, countMatches, countMatches, defaultIfBlank, defaultIfEmpty, defaultString, defaultString, deleteWhitespace, difference, endsWith, endsWithAny, endsWithIgnoreCase, equals, equalsAny, equalsAnyIgnoreCase, equalsIgnoreCase, firstNonBlank, firstNonEmpty, getBytes, getBytes, getCommonPrefix, getDigits, getFuzzyDistance, getIfBlank, getIfEmpty, getJaroWinklerDistance, getLevenshteinDistance, getLevenshteinDistance, indexOf, indexOf, indexOf, indexOf, indexOfAny, indexOfAny, indexOfAny, indexOfAnyBut, indexOfAnyBut, indexOfDifference, indexOfDifference, indexOfIgnoreCase, indexOfIgnoreCase, isAllBlank, isAllEmpty, isAllLowerCase, isAllUpperCase, isAlpha, isAlphanumeric, isAlphanumericSpace, isAlphaSpace, isAnyBlank, isAnyEmpty, isAsciiPrintable, isBlank, isEmpty, isMixedCase, isNoneBlank, isNoneEmpty, isNotBlank, isNotEmpty, isNumeric, isNumericSpace, isWhitespace, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, joinWith, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, lastIndexOfIgnoreCase, lastIndexOfIgnoreCase, lastOrdinalIndexOf, left, leftPad, leftPad, leftPad, length, lowerCase, lowerCase, mid, normalizeSpace, ordinalIndexOf, overlay, prependIfMissing, prependIfMissingIgnoreCase, remove, remove, removeAll, removeEnd, removeEndIgnoreCase, removeFirst, removeIgnoreCase, removePattern, removeStart, removeStart, removeStartIgnoreCase, repeat, repeat, repeat, replace, replace, replaceAll, replaceChars, replaceChars, replaceEach, replaceEachRepeatedly, replaceFirst, replaceIgnoreCase, replaceIgnoreCase, replaceOnce, replaceOnceIgnoreCase, replacePattern, reverse, reverseDelimited, right, rightPad, rightPad, rightPad, rotate, split, split, split, split, splitByCharacterType, splitByCharacterTypeCamelCase, splitByWholeSeparator, splitByWholeSeparator, splitByWholeSeparatorPreserveAllTokens, splitByWholeSeparatorPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, startsWith, startsWithAny, startsWithIgnoreCase, strip, strip, stripAccents, stripAll, stripAll, stripEnd, stripStart, stripToEmpty, stripToNull, substring, substring, substringAfter, substringAfter, substringAfterLast, substringAfterLast, substringBefore, substringBefore, substringBeforeLast, substringBetween, substringBetween, substringsBetween, swapCase, toCodePoints, toEncodedString, toRootLowerCase, toRootUpperCase, toString, trim, trimToEmpty, trimToNull, truncate, truncate, uncapitalize, unwrap, unwrap, upperCase, upperCase, valueOf, wrap, wrap, wrapIfMissing, wrapIfMissing

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

  • 构造器详细资料

    • StringUtil

      public StringUtil()
  • 方法详细资料

    • randomStr

      public static String randomStr(int n)
      得到随机字符
      参数:
      n -
      返回:
    • randomDigit

      public static String randomDigit(int n)
      得到随机数字
      参数:
      n -
      返回:
    • isNull

      public static boolean isNull(Object object)
      判断一个对象是否为空
      参数:
      object - Object
      返回:
      true:为空 false:非空
    • isNotEmpty

      public static boolean isNotEmpty(String str)
      判断一个字符串是否为非空串
      参数:
      str - String
      返回:
      true:非空串 false:空串
    • isEmpty

      public static boolean isEmpty(String str)
      判断一个字符串是否为空串
      参数:
      str - String
      返回:
      true:为空 false:非空
    • isEmpty

      public static boolean isEmpty(Collection<?> coll)
      判断一个Collection是否为空, 包含List,Set,Queue
      参数:
      coll - 要判断的Collection
      返回:
      true:为空 false:非空