public class StringUtils
extends cn.hutool.core.util.StrUtil
BACKSLASH, BRACKET_END, BRACKET_START, C_BACKSLASH, C_BRACKET_END, C_BRACKET_START, C_COLON, C_COMMA, C_CR, C_DELIM_END, C_DELIM_START, C_DOT, C_LF, C_SLASH, C_SPACE, C_TAB, C_UNDERLINE, COLON, COMMA, CR, CRLF, DASHED, DELIM_END, DELIM_START, DOT, DOUBLE_DOT, EMPTY, EMPTY_JSON, HTML_AMP, HTML_APOS, HTML_GT, HTML_LT, HTML_NBSP, HTML_QUOTE, INDEX_NOT_FOUND, LF, NULL, SLASH, SPACE, TAB, UNDERLINE| 构造器和说明 |
|---|
StringUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static StringBuffer |
deleteFirstEqualString(StringBuffer sb,
String condition)
删除开始相等的字符串
|
static String |
deleteFirstLastEqualString(String str,
String firstStr,
String lastStr)
删除前后相等字符串
|
static String |
deleteFirstLastString(String str,
int length)
删除前后字符串
|
static StringBuffer |
deleteLastEqualString(StringBuffer sb,
String condition)
删除尾部相等的字符串
|
static boolean |
isEmptys(String[] array)
判断String数组是否为空
弱判断,只确定数组中第一个元素是否为空 |
static boolean |
isNotEmptys(String[] array)
确认String数组不为空
弱判断,只确定数组中第一个元素是否为空 |
static String |
replace(String str,
String replacedStr,
int start,
int end)
替换字符串-根据索引
|
addPrefixIfNot, addSuffixIfNot, appendIfMissing, appendIfMissing, appendIfMissingIgnoreCase, blankToDefault, brief, builder, builder, builder, byteBuffer, byteLength, bytes, bytes, bytes, center, center, center, cleanBlank, compare, compareIgnoreCase, compareVersion, concat, contains, containsAny, containsAny, containsAnyIgnoreCase, containsBlank, containsIgnoreCase, containsOnly, count, count, cut, emptyIfNull, emptyToDefault, emptyToNull, endWith, endWith, endWith, endWithAny, endWithIgnoreCase, equals, equals, equalsAny, equalsAny, equalsAnyIgnoreCase, equalsCharAt, equalsIgnoreCase, fill, fillAfter, fillBefore, format, format, genGetter, genSetter, getContainsStr, getContainsStrIgnoreCase, getGeneralField, getReader, getWriter, hasBlank, hasEmpty, hide, indexedFormat, indexOf, indexOf, indexOf, indexOf, indexOfIgnoreCase, indexOfIgnoreCase, isAllBlank, isAllCharMatch, isAllEmpty, isBlank, isBlankIfStr, isBlankOrUndefined, isEmpty, isEmptyIfStr, isEmptyOrUndefined, isLowerCase, isNotBlank, isNotEmpty, isNullOrUndefined, isSubEquals, isSurround, isSurround, isUpperCase, isWrap, isWrap, isWrap, isWrap, join, lastIndexOf, lastIndexOfIgnoreCase, lastIndexOfIgnoreCase, length, lowerFirst, maxLength, move, nullToDefault, nullToEmpty, ordinalIndexOf, padAfter, padAfter, padPre, padPre, prependIfMissing, prependIfMissing, prependIfMissingIgnoreCase, removeAll, removeAll, removeAllLineBreaks, removePreAndLowerFirst, removePreAndLowerFirst, removePrefix, removePrefixIgnoreCase, removeSufAndLowerFirst, removeSuffix, removeSuffixIgnoreCase, repeat, repeat, repeatAndJoin, repeatByLength, replace, replace, replace, replace, replace, replace, replaceChars, replaceChars, replaceIgnoreCase, reverse, similar, similar, split, split, split, split, split, split, split, splitToArray, splitToArray, splitToInt, splitToInt, splitToLong, splitToLong, splitTrim, splitTrim, splitTrim, splitTrim, startWith, startWith, startWith, startWithAny, startWithIgnoreCase, str, str, str, str, str, str, str, str, str, strBuilder, strBuilder, strBuilder, strip, strip, stripIgnoreCase, stripIgnoreCase, sub, subAfter, subAfter, subBefore, subBefore, subBetween, subBetween, subPre, subPreGbk, subSuf, subSufByLength, subWithLength, swapCase, toCamelCase, toString, toSymbolCase, totalLength, toUnderlineCase, trim, trim, trim, trimEnd, trimStart, trimToEmpty, trimToNull, unWrap, unWrap, unWrap, upperFirst, upperFirstAndAddPre, utf8Bytes, utf8Str, uuid, wrap, wrap, wrapAll, wrapAll, wrapAllIfMissing, wrapAllIfMissing, wrapIfMissingpublic static boolean isEmptys(String[] array)
弱判断,只确定数组中第一个元素是否为空
array - 要判断的String[]数组public static boolean isNotEmptys(String[] array)
弱判断,只确定数组中第一个元素是否为空
array - 要判断的String[]数组public static String replace(String str, String replacedStr, int start, int end)
str - 原始字符串replacedStr - 替换字符串start - 开始索引,包括此索引end - 结束索引,不包括此索引(结束索引==开始索引:将在开始索引处插入替换字符串)public static StringBuffer deleteFirstEqualString(StringBuffer sb, String condition)
sb - 需要处理的字符串condition - 条件public static StringBuffer deleteLastEqualString(StringBuffer sb, String condition)
sb - 需要处理的字符串condition - 条件public static String deleteFirstLastEqualString(String str, String firstStr, String lastStr)
str - 需要处理的字符串firstStr - 开始字符串lastStr - 末尾字符串Copyright © 2019 Pivotal Software, Inc.. All rights reserved.