类 CharSequenceUtil

java.lang.Object
com.xiaoTools.util.charSequenceUtil.CharSequenceUtil
直接已知子类:
StrUtil

public class CharSequenceUtil
extends Object
[CharSequence 相关工具类封装](Encapsulation of CharSequence related tool classes)
从以下版本开始:
2021/7/4 7:34 下午
作者:
XiaoXunYao
  • 构造器概要

    构造器
    构造器 说明
    CharSequenceUtil()  
  • 方法概要

    修饰符和类型 方法 说明
    static String addPrefixIfNot​(CharSequence str, CharSequence prefix)
    [如果给定字符串不是以prefix开头的,在开头补充 prefix](If the given string does not start with prefix, prefix is added at the beginning)
    static String addSuffixIfNot​(CharSequence str, CharSequence suffix)
    [如果给定字符串不是以suffix结尾的,在尾部补充 suffix](If the given string does not end with suffix, suffix is added at the end)
    static String appendIfMissing​(CharSequence value, CharSequence suffix, boolean ignoreCase, CharSequence... suffixes)
    [如果给定字符串不是以给定的一个或多个字符串为结尾,则在尾部添加结尾字符串](If the given string does not end with one or more of the given strings, the ending string is added at the end)
    static String appendIfMissing​(CharSequence value, CharSequence suffix, CharSequence... suffixes)
    [如果给定字符串不是以给定的一个或多个字符串为结尾,则在尾部添加结尾字符串](If the given string does not end with one or more of the given strings, the ending string is added at the end)
    static String appendIfMissingIgnoreCase​(CharSequence value, CharSequence suffix, CharSequence... suffixes)
    [如果给定字符串不是以给定的一个或多个字符串为结尾,则在尾部添加结尾字符串](If the given string does not end with one or more of the given strings, the ending string is added at the end)
    static String blankToDefault​(CharSequence str, String defaultStr)
    [如果字符串是null或者""或者空白,则返回指定默认字符串,否则返回字符串本身。]
    static String brief​(CharSequence value, int maxLength)
    [将给定字符串,变成 "xxx...xxx" 形式的字符串](Change the given string into a string in the form of "XXX...
    static StringBuilder builder​(CharSequence... values)
    [创建StringBuilder对象](Create StringBuilder object)
    static ByteBuffer byteBuffer​(CharSequence value, String charset)
    [字符串转换为byteBuffer](String to ByteBuffer)
    static int byteLength​(CharSequence cs, Charset charset)
    [给定字符串转为bytes后的byte数(byte长度)](The number of bytes (byte length) after the given string is converted to bytes)
    static byte[] bytes​(CharSequence value)
    [编码字符串 使用系统默认编码](The encoding string uses the system default encoding)
    static byte[] bytes​(CharSequence value, String charset)
    [编码字符串](Encoding string)
    static byte[] bytes​(CharSequence value, Charset charset)
    [编码字符串](Encoding string)
    static String center​(CharSequence value, int size)
    [居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串](Center the string and supplement the specified string on both sides.
    static String center​(CharSequence value, int size, char padChar)
    [居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串](Center the string and supplement the specified string on both sides.
    static String center​(CharSequence value, int size, CharSequence padStr)
    [居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串](Center the string and supplement the specified string on both sides.
    static String cleanBlank​(CharSequence str)
    [清理空白字符](Clean up white space)
    static int compare​(CharSequence str1, CharSequence str2, boolean nullIsLess)
    [比较两个字符串,用于排序](Compare two strings for sorting)
    static int compareIgnoreCase​(CharSequence str1, CharSequence str2, boolean nullIsLess)
    [比较两个字符串,用于排序,大小写不敏感](Compare two strings for sorting, case insensitive)
    static int compareVersion​(CharSequence value1, CharSequence value2)
    [比较两个版本](Compare the two versions)
    static String concat​(boolean isNullToEmpty, CharSequence... values)
    [连接多个字符串为一个](Connect multiple strings into one)
    static boolean contains​(CharSequence str, char searchChar)
    [指定字符是否在字符串中出现过](Specifies whether the character has ever appeared in a string)
    static boolean contains​(CharSequence str, CharSequence searchStr)
    [指定字符串是否在字符串中出现过](Specifies whether the string ever appears in the string)
    static boolean containsAny​(CharSequence str, char... strArray)
    [查找指定字符串是否包含指定字符列表中的任意一个字符](Finds whether the specified string contains any character in the specified character list)
    static boolean containsAny​(CharSequence str, CharSequence... strArray)
    [查找指定字符串是否包含指定字符串列表中的任意一个字符串](Finds whether the specified string contains any string in the specified string list)
    static boolean containsAnyIgnoreCase​(CharSequence str, CharSequence... strArray)
    [查找指定字符串是否包含指定字符串列表中的任意一个字符串](Finds whether the specified string contains any string in the specified string list)
    static boolean containsBlank​(CharSequence str)
    [给定字符串是否包含空白符(空白符包括空格、制表符、全角空格和不间断空格)](Whether the given string contains white space (white space includes spaces, tabs, full width spaces, and uninterrupted spaces))
    static boolean containsIgnoreCase​(CharSequence str, CharSequence value)
    [是否包含特定字符,忽略大小写,如果给定两个参数都为null,返回true](Whether to include specific characters, regardless of case.
    static boolean containsOnly​(CharSequence str, char... strArray)
    [检查指定字符串中是否只包含给定的字符](Checks whether the specified string contains only the given character)
    static int count​(CharSequence content, char charForSearch)
    [统计指定内容中包含指定字符串的数量](Counts the number of specified strings in the specified content)
    static int count​(CharSequence content, CharSequence strForSearch)
    [统计指定内容中包含指定字符串的数量](Counts the number of specified strings in the specified content)
    static String[] cut​(CharSequence str, int partLength)
    [将字符串切分为N等份](Divide a string into N equal parts)
    static String desensitized​(CharSequence value, DesensitizedUtil.DesensitizedType desensitizedType)
    [脱敏,使用默认的脱敏策略](Desensitization, using the default desensitization strategy)
    static String emptyIfNull​(CharSequence str)
    [当给定字符串为null时,转换为Empty](When the given string is 「null」, it is converted to 「empty」)
    static String emptyToDefault​(CharSequence str, String defaultStr)
    [如果字符串是null或者"",则返回指定默认字符串,否则返回字符串本身。]
    static String emptyToNull​(CharSequence str)
    [当给定字符串为空字符串时,转换为null](When the given string is an empty string, it is converted to null)
    static boolean endWith​(CharSequence str, char c)
    [字符串是否以给定字符结尾](Whether the string ends with the given character)
    static boolean endWith​(CharSequence str, CharSequence suffix)
    [是否以指定字符串结尾](Whether to end with the specified string)
    static boolean endWith​(CharSequence str, CharSequence suffix, boolean isIgnoreCase)
    [是否以指定字符串结尾](Whether to end with the specified string)
    static boolean endWithAny​(CharSequence str, CharSequence... suffixes)
    [给定字符串是否以任何一个字符串结尾](Whether the given string ends with any string)
    static boolean endWithAnyIgnoreCase​(CharSequence str, CharSequence... suffixes)
    [给定字符串是否以任何一个字符串结尾(忽略大小写)](Whether the given string ends with any string (case ignored))
    static boolean endWithIgnoreCase​(CharSequence str, CharSequence suffix)
    [是否以指定字符串结尾,忽略大小写](Whether to end with the specified string, ignoring case)
    static boolean equals​(CharSequence str1, CharSequence str2)
    [比较两个字符串(大小写敏感)。]
    static boolean equals​(CharSequence str1, CharSequence str2, boolean ignoreCase)
    [比较两个字符串是否相等。]
    static boolean equalsAny​(CharSequence str1, boolean ignoreCase, CharSequence... array)
    [给定字符串是否与提供的中任一字符串相同,相同则返回true,没有相同的返回false](If the given string is the same as any of the provided strings, true will be returned if it is the same, and false will be returned if it is not the same)
    static boolean equalsAny​(CharSequence str1, CharSequence... arrays)
    [给定字符串是否与提供的中任一字符串相同,相同则返回true,没有相同的返回false](If the given string is the same as any of the provided strings, true will be returned if it is the same, and false will be returned if it is not the same)
    static boolean equalsAnyIgnoreCase​(CharSequence str1, CharSequence... arrays)
    [给定字符串是否与提供的中任一字符串相同(忽略大小写),相同则返回true,没有相同的返回false](If the given string is the same as any of the provided strings (regardless of case), true will be returned if it is the same, and false will be returned if it is not the same)
    static boolean equalsCharAt​(CharSequence string, int position, char value)
    [字符串指定位置的字符是否与给定字符相同](Whether the character at the specified position of the string is the same as the given character)
    static boolean equalsIgnoreCase​(CharSequence str1, CharSequence str2)
    [比较两个字符串(大小写不敏感)。]
    static String filter​(CharSequence value, Filter<Character> filter)
    [过滤字符串](Filter strings)
    <T extends CharSequence>
    T
    firstNonBlank​(T... values)
    [返回第一个非 blank 元素](Returns the first non blank element)
    <T extends CharSequence>
    T
    firstNonEmpty​(T... values)
    [返回第一个非 empty 元素](Returns the first non empty element)
    <T extends CharSequence>
    T
    firstNonNull​(T... values)
    [返回第一个非 null 元素](Returns the first non null element)
    static String format​(CharSequence template, Object... params)
    [格式化文本, {} 表示占位符](Formatted text, {} represents a placeholder)
    static String genGetter​(CharSequence fieldName)
    [生成 get 方法名](Generate get method name)
    static String genSetter​(CharSequence fieldName)
    [生成 set 方法名](Generate set method name)
    static String getContainsStr​(CharSequence str, CharSequence... strArray)
    [查找指定字符串是否包含指定字符串列表中的任意一个字符串,如果包含返回找到的第一个字符串](Finds whether the specified string contains any string in the specified string list, and returns the first string found if it contains)
    static String getContainsStrIgnoreCase​(CharSequence str, CharSequence... strArray)
    [查找指定字符串是否包含指定字符串列表中的任意一个字符串,如果包含返回找到的第一个字符串](Finds whether the specified string contains any string in the specified string list, and returns the first string found if it contains)
    static String getGeneralField​(CharSequence getOrSetMethodName)
    [获得 set 或 get 或 is 方法对应的标准属性名](Get the standard property name corresponding to the set or get or is method)
    static boolean hasBlank​(CharSequence... strs)
    [指定字符串数组中,是否包含空字符串](Specifies whether the string array contains an empty string)
    static boolean hasEmpty​(CharSequence... strs)
    [是否包含空字符串](Contains an empty string)
    static String hide​(CharSequence value, int startInclude, int endExclude)
    [替换指定字符串的指定区间内字符为"*" 俗称:脱敏功能,后面其他功能](Replace the characters in the specified interval of the specified string as "*", commonly known as desensitization function, followed by other functions)
    static String indexedFormat​(CharSequence pattern, Object... arguments)
    [有序的格式化文本,使用{number}做为占位符](Orderly formatted text, using {number} as a placeholder)
    static int indexOf​(CharSequence str, char searchValue)
    [指定范围内查找指定字符](Find the specified character in the specified range)
    static int indexOf​(CharSequence str, char searchValue, int start)
    [指定范围内查找指定字符](Find the specified character in the specified range)
    static int indexOf​(CharSequence str, char searchValue, int start, int end)
    [指定范围内查找指定字符](Find the specified character in the specified range)
    static int indexOf​(CharSequence str, CharSequence searchValue, int fromIndex, boolean ignoreCase)
    [指定范围内查找字符串](Finds a string in the specified range)
    static int indexOfIgnoreCase​(CharSequence str, CharSequence searchValue)
    [指定范围内查找字符串,忽略大小写](Find string in specified range, ignore case)
    static int indexOfIgnoreCase​(CharSequence str, CharSequence searchValue, int fromIndex)
    [指定范围内查找字符串](Finds a string in the specified range)
    static boolean isAllBlank​(CharSequence... strs)
    [指定字符串数组中的元素,是否全部为空字符串。]
    static boolean isAllCharMatch​(CharSequence value, Matcher<Character> matcher)
    [字符串的每一个字符是否都与定义的匹配器匹配](Does each character of the string match the defined matcher)
    static boolean isAllEmpty​(CharSequence... strs)
    [指定字符串数组中的元素,是否全部为空字符串。]
    static boolean isAllNotBlank​(CharSequence... args)
    [是否存都不为null或空对象或空白符的对象](Do you want to save objects that are not null or empty or blank)
    static boolean isAllNotEmpty​(CharSequence... args)
    [指定字符串数组中的元素,是否都不为空字符串。]
    static boolean isBlank​(CharSequence str)
    [字符串是否为空白](Is the string blank)
    static boolean isBlankOrUndefined​(CharSequence str)
    [检查字符串是否为null、“null”、“undefined”](Check whether the string is null, "null", undefined)
    static boolean isEmpty​(CharSequence str)
    [字符串是否为空](Is the string empty)
    static boolean isEmptyOrUndefined​(CharSequence str)
    [检查字符串是否为null、“null”、“undefined”](Check whether the string is null, "null", undefined)
    static boolean isLowerCase​(CharSequence value)
    [给定字符串中的字母是否全部为小写](Whether all the letters in the given string are lowercase)
    static boolean isNotBlank​(CharSequence str)
    [字符串是否为非空白](Is the string non blank)
    static boolean isNotEmpty​(CharSequence str)
    [字符串是否为非空白](Whether the string is non-blank)
    static boolean isNullOrUndefined​(CharSequence str)
    [检查字符串是否为null、“null”、“undefined”](Check whether the string is null, "null", undefined)
    static boolean isSubEquals​(CharSequence str1, int start1, CharSequence str2, int start2, int length, boolean ignoreCase)
    [截取两个字符串的不同部分(长度一致),判断截取的子串是否相同](Intercepts different parts of two strings (the same length) to determine whether the intercepted substrings are the same)
    static boolean isSurround​(CharSequence str, char prefix, char suffix)
    [给定字符串是否被字符包围](Whether the given string is surrounded by characters)
    static boolean isSurround​(CharSequence str, CharSequence prefix, CharSequence suffix)
    [给定字符串是否被字符包围](Whether the given string is surrounded by characters)
    static boolean isUpperCase​(CharSequence value)
    [给定字符串中的字母是否全部为大写](Whether all the letters in the given string are uppercase)
    static boolean isWrap​(CharSequence str, char wrapper)
    [指定字符串是否被同一字符包装(前后都有这些字符串)](Specifies whether the string is wrapped by the same character (both before and after the string))
    static boolean isWrap​(CharSequence str, char prefixChar, char suffixChar)
    [指定字符串是否被包装](Specifies whether the string is wrapped)
    static boolean isWrap​(CharSequence str, String wrapper)
    [指定字符串是否被同一字符包装(前后都有这些字符串)](Specifies whether the string is wrapped by the same character (both before and after the string))
    static boolean isWrap​(CharSequence value, String prefix, String suffix)
    [指定字符串是否被包装](Specifies whether the string is wrapped)
    static String join​(CharSequence conjunction, Object... values)
    [以 conjunction 为分隔符将多个对象转换为字符串](Convert multiple objects to strings with conjunction as a delimiter)
    static int lastIndexOf​(CharSequence str, CharSequence searchValue, int fromIndex, boolean ignoreCase)
    [指定范围内查找字符串](Finds a string in the specified range)
    static int lastIndexOfIgnoreCase​(CharSequence str, CharSequence searchValue)
    [指定范围内查找字符串,忽略大小写](Find string in specified range, ignore case)
    static int lastIndexOfIgnoreCase​(CharSequence str, CharSequence searchValue, int fromIndex)
    [指定范围内查找字符串,忽略大小写](Find string in specified range, ignore case)
    static int length​(CharSequence value)
    [获取字符串的长度,如果为null返回0](Gets the length of the string, and returns 0 if NULL)
    static String lowerFirst​(CharSequence value)
    [小写首字母](Small initial)
    static String maxLength​(CharSequence string, int length)  
    static String move​(CharSequence str, int startInclude, int endExclude, int moveLength)
    [循环位移指定位置的字符串为指定距离](Circular displacement the string at the specified position is the specified distance)
    static String nullToDefault​(CharSequence str, String defaultStr)
    [当给定的字符串为「null」时,转换成为默认字符串](When the given string is 「null」, it is converted to the default string)
    static String nullToEmpty​(CharSequence str)
    [当给定字符串为null时,转换为Empty](When the given string is null, it is converted to empty)
    static int ordinalIndexOf​(CharSequence str, CharSequence searchValue, int ordinal)
    [返回字符串 searchValue 在字符串 str 中第 ordinal 次出现的位置](Returns the position of the ordinal occurrence of the string searchValue in the string str)
    static String padAfter​(CharSequence value, int length, char padChar)
    [补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之](The string is supplemented to meet the specified length.
    static String padAfter​(CharSequence value, int length, CharSequence padStr)
    [补充字符串以满足最小长度](Supplement string to meet minimum length)
    static String padPre​(CharSequence value, int length, char padChar)
    [补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之](The string is supplemented to meet the specified length.
    static String padPre​(CharSequence value, int length, CharSequence padStr)
    [补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之](The string is supplemented to meet the specified length.
    static String prependIfMissing​(CharSequence str, CharSequence prefix, boolean ignoreCase, CharSequence... prefixes)
    [如果给定字符串不是以给定的一个或多个字符串为开头,则在首部添加起始字符串](If the given string does not start with one or more given strings, the starting string is added at the beginning)
    static String prependIfMissing​(CharSequence value, CharSequence prefix, CharSequence... prefixes)
    [如果给定字符串不是以给定的一个或多个字符串为开头,则在首部添加起始字符串](If the given string does not start with one or more given strings, the starting string is added at the beginning)
    static String prependIfMissingIgnoreCase​(CharSequence str, CharSequence prefix, CharSequence... prefixes)
    [如果给定字符串不是以给定的一个或多个字符串为开头,则在首部添加起始字符串](If the given string does not start with one or more given strings, the starting string is added at the beginning)
    static String removeAll​(CharSequence str, char... chars)
    [去除字符串中指定的多个字符,如有多个则全部去除](Remove multiple characters specified in the string.
    static String removeAll​(CharSequence str, CharSequence removeValue)
    [移除字符串中所有给定字符串](Removes all given strings from a string)
    static String removeAllLineBreaks​(CharSequence str)
    [去除所有换行符](Remove all line breaks)
    static String removeAny​(CharSequence str, CharSequence... removeArray)
    [移除字符串中所有给定字符串,当某个字符串出现多次,则全部移除](Remove all given strings from a string.
    static String removePreAndLowerFirst​(CharSequence str, int preLength)
    [去掉首部指定长度的字符串并将剩余字符串首字母小写](Remove the specified length of the first string and lowercase the first letter of the remaining string)
    static String removePreAndLowerFirst​(CharSequence str, CharSequence prefix)
    [去掉首部指定长度的字符串并将剩余字符串首字母小写](Remove the specified length of the first string and lowercase the first letter of the remaining string)
    static String removePrefix​(CharSequence str, CharSequence prefix)
    [去掉指定前缀](Remove the specified prefix)
    static String removePrefixIgnoreCase​(CharSequence str, CharSequence prefix)
    [忽略大小写去掉指定前缀](Ignore case and remove the specified prefix)
    static String removeSufAndLowerFirst​(CharSequence str, CharSequence suffix)
    去掉指定后缀,并小写首字母
    static String removeSuffix​(CharSequence str, CharSequence suffix)  
    static String removeSuffixIgnoreCase​(CharSequence str, CharSequence suffix)  
    static String repeat​(char repeatValue, int count)
    [重复某一个字符](Repeat a character)
    static String repeat​(CharSequence str, int count)
    [重复某个字符串](Repeat a string)
    static String repeatAndJoin​(CharSequence str, int count, CharSequence conjunction)
    [重复某个字符串并通过分界符连接](Repeats a string and concatenates it with a separator)
    static String repeatByLength​(CharSequence str, int padLen)
    [重复某个字符串到指定长度](Repeats a string to a specified length)
    static String replace​(CharSequence value, int startInclude, int endExclude, char replacedChar)
    [替换指定字符串的指定区间内字符为固定字符](Replace the characters in the specified interval of the specified string as fixed characters)
    static String replace​(CharSequence value, int fromIndex, CharSequence search, CharSequence replacement, boolean ignoreCase)
    [替换字符串中的指定字符串](Replaces the specified string in the string)
    static String replace​(CharSequence value, CharSequence search, CharSequence replacement)
    [替换字符串中的指定字符串](Replaces the specified string in the string)
    static String replace​(CharSequence value, CharSequence search, CharSequence replacement, boolean ignoreCase)
    [替换字符串中的指定字符串](Replaces the specified string in the string)
    static String replace​(CharSequence value, String regex, Func1<Matcher,​String> replaceFun)
    [替换所有正则匹配的文本,并使用自定义函数决定如何替换](Replace all regular matched text and use custom functions to decide how to replace it)
    static String replace​(CharSequence value, Pattern pattern, Func1<Matcher,​String> replaceFun)
    [替换所有正则匹配的文本,并使用自定义函数决定如何替换](Replace all regular matched text and use custom functions to decide how to replace it)
    static String replaceChars​(CharSequence value, char[] chars, CharSequence replaced)
    [替换字符字符数组中所有的字符为 replaced](Replace all characters in the character array as replaced)
    static String replaceChars​(CharSequence value, String chars, CharSequence replaced)
    [替换字符字符数组中所有的字符为 replaced](Replace all characters in the character array as replaced)
    static String replaceIgnoreCase​(CharSequence value, CharSequence search, CharSequence replacement)
    [替换字符串中的指定字符串,忽略大小写](Replaces the specified string in the string, ignoring case)
    static List<String> split​(CharSequence str, char separator)
    [切分字符串](Segmentation string)
    static List<String> split​(CharSequence str, char separator, boolean isTrim, boolean ignoreEmpty)
    [切分字符串,不限制分片数量](Cut string, unlimited number of pieces)
    static List<String> split​(CharSequence str, char separator, int limit)
    [切分字符串,不去除切分后每个元素两边的空白符,不去除空白项](Cut string, do not remove the white space on both sides of each element after cutting, do not remove the white space)
    static List<String> split​(CharSequence str, char separator, int limit, boolean isTrim, boolean ignoreEmpty)
    [切分字符串](Segmentation string)
    static String[] split​(CharSequence str, int len)
    [根据给定长度,将给定字符串截取为多个部分](According to the given length, the given string is intercepted into multiple parts)
    static String[] split​(CharSequence str, CharSequence separator)
    [根据给定长度,将给定字符串截取为多个部分](According to the given length, the given string is intercepted into multiple parts)
    static List<String> split​(CharSequence str, CharSequence separator, int limit, boolean isTrim, boolean ignoreEmpty)
    [切分字符串](Segmentation string)
    static String[] splitToArray​(CharSequence str, char separator)
    [切分字符串](Segmentation string)
    static String[] splitToArray​(CharSequence str, char separator, int limit)
    [切分字符串](Segmentation string)
    static int[] splitToInt​(CharSequence str, char separator)
    [切分字符串为int数组](Splits a string into an int array)
    static int[] splitToInt​(CharSequence str, CharSequence separator)
    [切分字符串为int数组](Splits a string into an int array)
    static long[] splitToLong​(CharSequence str, char separator)
    [切分字符串为long数组](Splitting strings into long arrays)
    static long[] splitToLong​(CharSequence str, CharSequence separator)
    [切分字符串为long数组](Splitting strings into long arrays)
    static List<String> splitTrim​(CharSequence str, char separator)
    [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
    static List<String> splitTrim​(CharSequence str, char separator, int limit)
    [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
    static List<String> splitTrim​(CharSequence str, CharSequence separator)
    [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
    static List<String> splitTrim​(CharSequence str, CharSequence separator, int limit)
    [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
    static boolean startWith​(CharSequence str, char c)
    [字符串是否以给定字符开始](Whether the string starts with the given character)
    static boolean startWith​(CharSequence str, CharSequence prefix)
    [是否以指定字符串开头](Whether to start with the specified string)
    static boolean startWith​(CharSequence str, CharSequence prefix, boolean ignoreCase)
    [是否以指定字符串开头](Whether to start with the specified string)
    static boolean startWith​(CharSequence str, CharSequence prefix, boolean ignoreCase, boolean ignoreEquals)
    [是否以指定字符串开头](Whether to start with the specified string)
    static boolean startWithAny​(CharSequence str, CharSequence... prefixes)
    [给定字符串是否以任何一个字符串开始](Whether the given string starts with any string)
    static boolean startWithIgnoreCase​(CharSequence str, CharSequence prefix)
    [是否以指定字符串开头,忽略大小写](Whether to start with the specified string, ignoring case)
    static boolean startWithIgnoreEquals​(CharSequence str, CharSequence prefix)
    [是否以指定字符串开头,忽略相等字符串的情况](Whether to start with the specified string, ignoring the case of equal strings)
    static String str​(CharSequence value)
    [CharSequence 转为字符串,null安全](CharSequence to string, null safe)
    static StrBuilder strBuilder​(CharSequence... values)
    [创建 StrBuilder 对象](Creating StrBuilder objects)
    static String strip​(CharSequence str, CharSequence prefixOrSuffix)
    [去除两边的指定字符串](Remove both sides of the specified string)
    static String strip​(CharSequence str, CharSequence prefix, CharSequence suffix)
    [去除两边的指定字符串](Remove both sides of the specified string)
    static String stripIgnoreCase​(CharSequence str, CharSequence prefixOrSuffix)
    [去除两边的指定字符串,忽略大小写](Remove both sides of the specified string, ignoring case)
    static String stripIgnoreCase​(CharSequence str, CharSequence prefix, CharSequence suffix)
    [去除两边的指定字符串,忽略大小写](Remove both sides of the specified string, ignoring case)
    static String subString​(CharSequence value, int beginIndex, int endIndex)
    [截取字符串](Intercept string)
    static String subStringAfter​(CharSequence string, char separator, boolean isLastSeparator)
    [截取分隔字符串之后的字符串,不包括分隔字符串](Intercepts the string after the delimited string, excluding the delimited string)
    static String subStringAfter​(CharSequence string, CharSequence separator, boolean isLastSeparator)
    [截取分隔字符串之后的字符串,不包括分隔字符串](Intercepts the string after the delimited string, excluding the delimited string)
    static String subStringBefore​(CharSequence string, char separator, boolean isLastSeparator)
    [截取分隔字符串之前的字符串,不包括分隔字符串](Intercepts the string before the delimited string, excluding the delimited string)
    static String subStringBefore​(CharSequence string, CharSequence separator, boolean isLastSeparator)
    [截取分隔字符串之前的字符串,不包括分隔字符串](Intercepts the string before the delimited string, excluding the delimited string)
    static String subStringBetween​(CharSequence str, CharSequence beforeAndAfter)
    [截取指定字符串中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
    static String subStringBetween​(CharSequence str, CharSequence before, CharSequence after)
    [截取指定字符串中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
    static String[] subStringBetweenAll​(CharSequence str, CharSequence prefixAndSuffix)
    [截取指定字符串多段中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
    static String[] subStringBetweenAll​(CharSequence str, CharSequence prefix, CharSequence suffix)
    [截取指定字符串多段中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
    static String subStringByCodePoint​(CharSequence value, int beginIndex, int endIndex)
    [通过CodePoint截取字符串,可以截断Emoji](You can truncate Emoji by intercepting strings through codepoint)
    static String subStringPre​(CharSequence string, int toIndexExclude)
    [切割指定位置之前部分的字符串](Cuts the string before the specified position)
    static String subStringPreGbk​(CharSequence str, int length, CharSequence suffix)
    [截取部分字符串,这里一个汉字的长度认为是2](Intercept part of the string, where the length of a Chinese character is considered to be 2)
    static String subStringSuf​(CharSequence string, int fromIndex)
    [切割指定位置之后部分的字符串](Cuts the string after the specified position)
    static String subStringSufByLength​(CharSequence string, int length)
    [切割指定长度的后部分的字符串](A string that cuts the last part of the specified length)
    static String subStringWithLength​(String input, int fromIndex, int length)
    [截取字符串,从指定位置开始,截取指定长度的字符串](Intercepts the string, starts from the specified position, intercepts the specified length string)
    static String swapCase​(String value)
    [切换给定字符串中的大小写](Toggles the case of a given string)
    static String toCamelCase​(CharSequence name)
    [将下划线方式命名的字符串转换为驼峰式。
    static String toSymbolCase​(CharSequence value, char symbol)
    [将驼峰式命名的字符串转换为使用符号连接方式](Convert hump named string to symbolic connection)
    static int totalLength​(CharSequence... values)
    [给定字符串数组的总长度](The total length of the given string array)
    static String toUnderlineCase​(CharSequence value)
    [将驼峰式命名的字符串转换为下划线方式](Convert hump named strings to underscores)
    static String trim​(CharSequence str)
    [除去字符串头尾部的空白,如果字符串是null,依然返回null。]
    static String trim​(CharSequence str, int mode)
    [除去字符串头尾部的空白符,如果字符串是null,依然返回null。]
    static String trimEnd​(CharSequence str)
    [除去字符串尾部的空白,如果字符串是null,则返回null。]
    static String trimStart​(CharSequence str)
    [除去字符串头部的空白,如果字符串是null,则返回null。]
    static String trimToEmpty​(CharSequence str)
    [除去字符串头尾部的空白,如果字符串是null,则返回""。]
    static String trimToNull​(CharSequence str)
    [除去字符串头尾部的空白,如果字符串是null或者"",返回null](Remove the blanks at the beginning and end of the string.
    static String unWrap​(CharSequence value, char prefixAndSuffix)
    [去掉字符包装,如果未被包装则返回原字符串](Remove the character wrapping, and return the original string if it is not wrapped)
    static String unWrap​(CharSequence value, char prefix, char suffix)
    [去掉字符包装,如果未被包装则返回原字符串](Remove the character wrapping, and return the original string if it is not wrapped)
    static String unWrap​(CharSequence value, String prefix, String suffix)
    [去掉字符包装,如果未被包装则返回原字符串](Remove the character wrapping, and return the original string if it is not wrapped)
    static String upperFirst​(CharSequence value)
    [大写首字母](Capital initial)
    static String upperFirstAndAddPre​(CharSequence value, String pre)
    [原字符串首字母大写并在其首部添加指定字符串](Capitalize the original string and add the specified string at the beginning)
    static byte[] utf8Bytes​(CharSequence value)
    [编码字符串,编码为UTF-8](Encoding string, encoded as UTF-8)
    static String wrap​(CharSequence value, CharSequence prefixAndSuffix)
    [包装指定字符串](Wrapper specified string)
    static String wrap​(CharSequence value, CharSequence prefix, CharSequence suffix)
    [包装指定字符串](Wrapper specified string)
    static String[] wrapAll​(CharSequence prefix, CharSequence suffix, CharSequence... values)
    [包装多个字符串](Wrapping multiple strings)
    static String[] wrapAllIfMissing​(CharSequence prefix, CharSequence suffix, CharSequence... values)
    [使用成对的字符包装多个字符串,如果已经包装,则不再包装](Use pairs of characters to wrap multiple strings.
    static String[] wrapAllWithPair​(CharSequence prefixAndSuffix, CharSequence... values)
    [使用单个字符包装多个字符串](Wrapping multiple strings with a single character)
    static String[] wrapAllWithPairIfMissing​(CharSequence prefixAndSuffix, CharSequence... values)
    [使用成对的字符包装多个字符串,如果已经包装,则不再包装](Use pairs of characters to wrap multiple strings.
    static String wrapIfMissing​(CharSequence value, CharSequence prefix, CharSequence suffix)
    [包装指定字符串,如果前缀或后缀已经包含对应的字符串,则不再包装](Wrap the specified string.

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • CharSequenceUtil

      public CharSequenceUtil()
  • 方法详细资料

    • isBlank

      public static boolean isBlank​(CharSequence str)
      [字符串是否为空白](Is the string blank)
      参数:
      str - : 被检测的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/4 8:51 下午
    • isNotBlank

      public static boolean isNotBlank​(CharSequence str)
      [字符串是否为非空白](Is the string non blank)
      参数:
      str - : 被检测的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/4 9:03 下午
    • hasBlank

      public static boolean hasBlank​(CharSequence... strs)
      [指定字符串数组中,是否包含空字符串](Specifies whether the string array contains an empty string)
      参数:
      strs - : 字符串列表
      返回:
      boolean
      从以下版本开始:
      2021/7/4 9:05 下午
    • isAllBlank

      public static boolean isAllBlank​(CharSequence... strs)
      [指定字符串数组中的元素,是否全部为空字符串。](Specifies whether all the elements in the string array are empty strings.)
      参数:
      strs - : 字符串列表
      返回:
      boolean
      从以下版本开始:
      2021/7/4 9:08 下午
    • isEmpty

      public static boolean isEmpty​(CharSequence str)
      [字符串是否为空](Is the string empty)
      参数:
      str - : 被检测的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/4 9:08 下午
    • isNotEmpty

      public static boolean isNotEmpty​(CharSequence str)
      [字符串是否为非空白](Whether the string is non-blank)
      参数:
      str - : 被检测的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/5 8:32 上午
    • emptyIfNull

      public static String emptyIfNull​(CharSequence str)
      [当给定字符串为null时,转换为Empty](When the given string is 「null」, it is converted to 「empty」)
      参数:
      str - : 被检测的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/5 8:37 上午
    • nullToEmpty

      public static String nullToEmpty​(CharSequence str)
      [当给定字符串为null时,转换为Empty](When the given string is null, it is converted to empty)
      参数:
      str - : 被检查的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/5 8:39 上午
    • nullToDefault

      public static String nullToDefault​(CharSequence str, String defaultStr)
      [当给定的字符串为「null」时,转换成为默认字符串](When the given string is 「null」, it is converted to the default string)
      参数:
      str - : 被检查的字符串
      defaultStr - : 默认字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/5 8:41 上午
    • emptyToDefault

      public static String emptyToDefault​(CharSequence str, String defaultStr)
      [如果字符串是null或者"",则返回指定默认字符串,否则返回字符串本身。](If the string is null or '', the specified default string is returned; otherwise, the string itself is returned.)
      参数:
      str - : 要转换的字符串
      defaultStr - : 默认字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/5 8:43 上午
    • blankToDefault

      public static String blankToDefault​(CharSequence str, String defaultStr)
      [如果字符串是null或者""或者空白,则返回指定默认字符串,否则返回字符串本身。](If the string is null or "" or blank, the specified default string is returned; otherwise, the string itself is returned.)
      参数:
      str - : 要转换的字符串
      defaultStr - : 默认字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/5 8:44 上午
    • emptyToNull

      public static String emptyToNull​(CharSequence str)
      [当给定字符串为空字符串时,转换为null](When the given string is an empty string, it is converted to null)
      参数:
      str - : 被转换的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/5 8:56 上午
    • hasEmpty

      public static boolean hasEmpty​(CharSequence... strs)
      [是否包含空字符串](Contains an empty string)
      参数:
      strs - : 字符串列表
      返回:
      boolean
      从以下版本开始:
      2021/7/5 8:58 上午
    • isAllEmpty

      public static boolean isAllEmpty​(CharSequence... strs)
      [指定字符串数组中的元素,是否全部为空字符串。](Specifies whether all the elements in the string array are empty strings.)
      参数:
      strs - : 字符串列表
      返回:
      boolean
      从以下版本开始:
      2021/7/5 9:03 上午
    • isAllNotEmpty

      public static boolean isAllNotEmpty​(CharSequence... args)
      [指定字符串数组中的元素,是否都不为空字符串。](Specifies whether the elements in the string array are not empty strings.)
      参数:
      args - : 字符串数组
      返回:
      boolean
      从以下版本开始:
      2021/7/5 9:04 上午
    • isAllNotBlank

      public static boolean isAllNotBlank​(CharSequence... args)
      [是否存都不为null或空对象或空白符的对象](Do you want to save objects that are not null or empty or blank)
      参数:
      args - : 字符串数组
      返回:
      boolean
      从以下版本开始:
      2021/7/5 9:05 上午
    • isNullOrUndefined

      public static boolean isNullOrUndefined​(CharSequence str)
      [检查字符串是否为null、“null”、“undefined”](Check whether the string is null, "null", undefined)
      参数:
      str - : 被检查的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/5 9:06 上午
    • isEmptyOrUndefined

      public static boolean isEmptyOrUndefined​(CharSequence str)
      [检查字符串是否为null、“null”、“undefined”](Check whether the string is null, "null", undefined)
      参数:
      str - : 被检查的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/5 9:09 上午
    • isBlankOrUndefined

      public static boolean isBlankOrUndefined​(CharSequence str)
      [检查字符串是否为null、“null”、“undefined”](Check whether the string is null, "null", undefined)
      参数:
      str - : 被检查的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/5 9:15 上午
    • trim

      public static String trim​(CharSequence str)
      [除去字符串头尾部的空白,如果字符串是null,依然返回null。](Remove the blanks at the beginning and end of the string. If the string is null, null is still returned.)
      参数:
      str - : 要处理的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/6 7:45 上午
    • trimToEmpty

      public static String trimToEmpty​(CharSequence str)
      [除去字符串头尾部的空白,如果字符串是null,则返回""。](Remove the blanks at the beginning and end of the string, and return "" if the string is null.)
      参数:
      str - : 要处理的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/6 7:46 上午
    • trimToNull

      public static String trimToNull​(CharSequence str)
      [除去字符串头尾部的空白,如果字符串是null或者"",返回null](Remove the blanks at the beginning and end of the string. If the string is null or '', null is returned)
      参数:
      str - : 要处理的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/6 7:48 上午
    • trimStart

      public static String trimStart​(CharSequence str)
      [除去字符串头部的空白,如果字符串是null,则返回null。](Remove the blanks in the head of the string, and return null if the string is null.)
      参数:
      str - : 要处理的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/6 7:49 上午
    • trimEnd

      public static String trimEnd​(CharSequence str)
      [除去字符串尾部的空白,如果字符串是null,则返回null。](Remove the blanks at the end of the string and return null if the string is null.)
      参数:
      str - : 要处理的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/6 7:50 上午
    • trim

      public static String trim​(CharSequence str, int mode)
      [除去字符串头尾部的空白符,如果字符串是null,依然返回null。](Remove the blanks at the beginning and end of the string, and return null if the string is null.)
      参数:
      str - : 要处理的字符串
      mode - : -1表示trimStart,0表示trim全部, 1表示trimEnd
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/6 7:51 上午
    • startWith

      public static boolean startWith​(CharSequence str, char c)
      [字符串是否以给定字符开始](Whether the string starts with the given character)
      参数:
      str - : 字符串
      c - : 字符
      返回:
      boolean
      从以下版本开始:
      2021/7/7 9:45 下午
    • startWith

      public static boolean startWith​(CharSequence str, CharSequence prefix, boolean ignoreCase)
      [是否以指定字符串开头](Whether to start with the specified string)
      参数:
      str - : 被监测字符串
      prefix - : 开头字符串
      ignoreCase - : 是否忽略大小写
      返回:
      boolean
      从以下版本开始:
      2021/7/7 9:55 下午
    • startWith

      public static boolean startWith​(CharSequence str, CharSequence prefix, boolean ignoreCase, boolean ignoreEquals)
      [是否以指定字符串开头](Whether to start with the specified string)
      参数:
      str - : 被监测字符串
      prefix - : 开头字符串
      ignoreCase - : 是否忽略大小写
      ignoreEquals - : 是否忽略字符串相等的情况
      返回:
      boolean
      从以下版本开始:
      2021/7/7 9:57 下午
    • startWith

      public static boolean startWith​(CharSequence str, CharSequence prefix)
      [是否以指定字符串开头](Whether to start with the specified string)
      参数:
      str - : 被监测字符串
      prefix - : 开头字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/7 10:05 下午
    • startWithIgnoreEquals

      public static boolean startWithIgnoreEquals​(CharSequence str, CharSequence prefix)
      [是否以指定字符串开头,忽略相等字符串的情况](Whether to start with the specified string, ignoring the case of equal strings)
      参数:
      str - : 被监测字符串
      prefix - : 开头字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/7 10:06 下午
    • startWithIgnoreCase

      public static boolean startWithIgnoreCase​(CharSequence str, CharSequence prefix)
      [是否以指定字符串开头,忽略大小写](Whether to start with the specified string, ignoring case)
      参数:
      str - : 被监测字符串
      prefix - : 开头字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/7 10:07 下午
    • startWithAny

      public static boolean startWithAny​(CharSequence str, CharSequence... prefixes)
      [给定字符串是否以任何一个字符串开始](Whether the given string starts with any string)
      参数:
      str - : 给定字符串
      prefixes - : 需要检测的开始字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/7 10:10 下午
    • endWith

      public static boolean endWith​(CharSequence str, char c)
      [字符串是否以给定字符结尾](Whether the string ends with the given character)
      参数:
      str - : 字符串
      c - : 字符
      返回:
      boolean
      从以下版本开始:
      2021/7/8 1:39 下午
    • endWith

      public static boolean endWith​(CharSequence str, CharSequence suffix, boolean isIgnoreCase)
      [是否以指定字符串结尾](Whether to end with the specified string)
      参数:
      str - : 被监测字符串
      suffix - : 结尾字符串
      isIgnoreCase - : 是否忽略大小写
      返回:
      boolean
      从以下版本开始:
      2021/7/8 1:45 下午
    • endWith

      public static boolean endWith​(CharSequence str, CharSequence suffix)
      [是否以指定字符串结尾](Whether to end with the specified string)
      参数:
      str - : 被监测字符串
      suffix - : 结尾字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/8 1:59 下午
    • endWithIgnoreCase

      public static boolean endWithIgnoreCase​(CharSequence str, CharSequence suffix)
      [是否以指定字符串结尾,忽略大小写](Whether to end with the specified string, ignoring case)
      参数:
      str - : 被监测字符串
      suffix - : 结尾字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/8 3:59 下午
    • endWithAny

      public static boolean endWithAny​(CharSequence str, CharSequence... suffixes)
      [给定字符串是否以任何一个字符串结尾](Whether the given string ends with any string)
      参数:
      str - : 给定字符串
      suffixes - : 需要检测的结尾字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/8 4:01 下午
    • endWithAnyIgnoreCase

      public static boolean endWithAnyIgnoreCase​(CharSequence str, CharSequence... suffixes)
      [给定字符串是否以任何一个字符串结尾(忽略大小写)](Whether the given string ends with any string (case ignored))
      参数:
      str - : 给定字符串
      suffixes - : 需要检测的结尾字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/8 4:05 下午
    • contains

      public static boolean contains​(CharSequence str, char searchChar)
      [指定字符是否在字符串中出现过](Specifies whether the character has ever appeared in a string)
      参数:
      str - : 字符串
      searchChar - : 被查找的字符
      返回:
      boolean
      从以下版本开始:
      2021/7/8 4:13 下午
    • contains

      public static boolean contains​(CharSequence str, CharSequence searchStr)
      [指定字符串是否在字符串中出现过](Specifies whether the string ever appears in the string)
      参数:
      str - : 字符串
      searchStr - : 被查找的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/8 4:27 下午
    • containsAny

      public static boolean containsAny​(CharSequence str, CharSequence... strArray)
      [查找指定字符串是否包含指定字符串列表中的任意一个字符串](Finds whether the specified string contains any string in the specified string list)
      参数:
      str - : 指定字符串
      strArray - : 需要检查的字符串数组
      返回:
      boolean
      从以下版本开始:
      2021/7/8 4:28 下午
    • containsAny

      public static boolean containsAny​(CharSequence str, char... strArray)
      [查找指定字符串是否包含指定字符列表中的任意一个字符](Finds whether the specified string contains any character in the specified character list)
      参数:
      str - : 指定字符串
      strArray - : 需要检查的字符数组
      返回:
      boolean
      从以下版本开始:
      2021/7/8 4:29 下午
    • containsOnly

      public static boolean containsOnly​(CharSequence str, char... strArray)
      [检查指定字符串中是否只包含给定的字符](Checks whether the specified string contains only the given character)
      参数:
      str - : 字符串
      strArray - : 检查的字符
      返回:
      boolean
      从以下版本开始:
      2021/7/8 4:35 下午
    • containsBlank

      public static boolean containsBlank​(CharSequence str)
      [给定字符串是否包含空白符(空白符包括空格、制表符、全角空格和不间断空格)](Whether the given string contains white space (white space includes spaces, tabs, full width spaces, and uninterrupted spaces))
      参数:
      str - : 字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/8 5:19 下午
    • getContainsStr

      public static String getContainsStr​(CharSequence str, CharSequence... strArray)
      [查找指定字符串是否包含指定字符串列表中的任意一个字符串,如果包含返回找到的第一个字符串](Finds whether the specified string contains any string in the specified string list, and returns the first string found if it contains)
      参数:
      str - : 指定字符串
      strArray - : 需要检查的字符串数组
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 5:21 下午
    • containsIgnoreCase

      public static boolean containsIgnoreCase​(CharSequence str, CharSequence value)
      [是否包含特定字符,忽略大小写,如果给定两个参数都为null,返回true](Whether to include specific characters, regardless of case. If both parameters are null, return true)
      参数:
      str - : 被检测字符串
      value - : 被测试是否包含的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/8 5:41 下午
    • containsAnyIgnoreCase

      public static boolean containsAnyIgnoreCase​(CharSequence str, CharSequence... strArray)
      [查找指定字符串是否包含指定字符串列表中的任意一个字符串](Finds whether the specified string contains any string in the specified string list)
      参数:
      str - : 指定字符串
      strArray - : 需要检查的字符串数组
      返回:
      boolean
      从以下版本开始:
      2021/7/8 5:43 下午
    • getContainsStrIgnoreCase

      public static String getContainsStrIgnoreCase​(CharSequence str, CharSequence... strArray)
      [查找指定字符串是否包含指定字符串列表中的任意一个字符串,如果包含返回找到的第一个字符串](Finds whether the specified string contains any string in the specified string list, and returns the first string found if it contains)
      参数:
      str - : 指定字符串
      strArray - : 需要检查的字符串数组
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 5:44 下午
    • indexOf

      public static int indexOf​(CharSequence str, char searchValue)
      [指定范围内查找指定字符](Find the specified character in the specified range)
      参数:
      str - : 字符串
      searchValue - : 被查找的字符
      返回:
      int
      从以下版本开始:
      2021/7/8 5:57 下午
    • indexOf

      public static int indexOf​(CharSequence str, char searchValue, int start)
      [指定范围内查找指定字符](Find the specified character in the specified range)
      参数:
      str - : 字符串
      searchValue - : 被查找的字符
      start - : 起始位置,如果小于0,从0开始查找
      返回:
      int
      从以下版本开始:
      2021/7/8 6:05 下午
    • indexOf

      public static int indexOf​(CharSequence str, char searchValue, int start, int end)
      [指定范围内查找指定字符](Find the specified character in the specified range)
      参数:
      str - : 字符串
      searchValue - : 被查找的字符
      start - : 起始位置,如果小于0,从0开始查找
      end - : 终止位置,如果超过str.length()则默认查找到字符串末尾
      返回:
      int
      从以下版本开始:
      2021/7/8 6:07 下午
    • indexOfIgnoreCase

      public static int indexOfIgnoreCase​(CharSequence str, CharSequence searchValue)
      [指定范围内查找字符串,忽略大小写](Find string in specified range, ignore case)
      参数:
      str - : 字符串
      searchValue - : 需要查找位置的字符串
      返回:
      int
      从以下版本开始:
      2021/7/8 6:28 下午
    • indexOfIgnoreCase

      public static int indexOfIgnoreCase​(CharSequence str, CharSequence searchValue, int fromIndex)
      [指定范围内查找字符串](Finds a string in the specified range)
      参数:
      str - : 字符串
      searchValue - : 需要查找位置的字符串
      fromIndex - : 起始位置
      返回:
      int
      从以下版本开始:
      2021/7/8 6:29 下午
    • indexOf

      public static int indexOf​(CharSequence str, CharSequence searchValue, int fromIndex, boolean ignoreCase)
      [指定范围内查找字符串](Finds a string in the specified range)
      参数:
      str - : 字符串
      searchValue - : 需要查找位置的字符串
      fromIndex - : 起始位置
      ignoreCase - : 是否忽略大小写
      返回:
      int
      从以下版本开始:
      2021/7/8 6:46 下午
    • lastIndexOfIgnoreCase

      public static int lastIndexOfIgnoreCase​(CharSequence str, CharSequence searchValue)
      [指定范围内查找字符串,忽略大小写](Find string in specified range, ignore case)
      参数:
      str - : 字符串
      searchValue - : 需要查找位置的字符串
      返回:
      int
      从以下版本开始:
      2021/7/8 6:48 下午
    • lastIndexOfIgnoreCase

      public static int lastIndexOfIgnoreCase​(CharSequence str, CharSequence searchValue, int fromIndex)
      [指定范围内查找字符串,忽略大小写](Find string in specified range, ignore case)
      参数:
      str - : 字符串
      searchValue - : 需要查找位置的字符串
      fromIndex - : 起始位置,从后往前计数
      返回:
      int
      从以下版本开始:
      2021/7/8 6:53 下午
    • lastIndexOf

      public static int lastIndexOf​(CharSequence str, CharSequence searchValue, int fromIndex, boolean ignoreCase)
      [指定范围内查找字符串](Finds a string in the specified range)
      参数:
      str - : 字符串
      searchValue - : 需要查找位置的字符串
      fromIndex - : 起始位置,从后往前计数
      ignoreCase - : 是否忽略大小写
      返回:
      int
      从以下版本开始:
      2021/7/8 7:05 下午
    • ordinalIndexOf

      public static int ordinalIndexOf​(CharSequence str, CharSequence searchValue, int ordinal)
      [返回字符串 searchValue 在字符串 str 中第 ordinal 次出现的位置](Returns the position of the ordinal occurrence of the string searchValue in the string str)
      参数:
      str - : 被检查的字符串,可以为null
      searchValue - : 被查找的字符串,可以为null
      ordinal - : 第几次出现的位置
      返回:
      int
      从以下版本开始:
      2021/7/8 7:11 下午
    • removeAll

      public static String removeAll​(CharSequence str, CharSequence removeValue)
      [移除字符串中所有给定字符串](Removes all given strings from a string)
      参数:
      str - : 字符串
      removeValue - : 被移除的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:16 下午
    • removeAny

      public static String removeAny​(CharSequence str, CharSequence... removeArray)
      [移除字符串中所有给定字符串,当某个字符串出现多次,则全部移除](Remove all given strings from a string. When a string appears more than once, remove all strings)
      参数:
      str - : 字符串
      removeArray - : 被移除的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:18 下午
    • removeAll

      public static String removeAll​(CharSequence str, char... chars)
      [去除字符串中指定的多个字符,如有多个则全部去除](Remove multiple characters specified in the string. If there are multiple characters, remove them all)
      参数:
      str - : 字符串
      chars - : 字符列表
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:22 下午
    • removeAllLineBreaks

      public static String removeAllLineBreaks​(CharSequence str)
      [去除所有换行符](Remove all line breaks)
      参数:
      str - : 字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:24 下午
    • removePreAndLowerFirst

      public static String removePreAndLowerFirst​(CharSequence str, int preLength)
      [去掉首部指定长度的字符串并将剩余字符串首字母小写](Remove the specified length of the first string and lowercase the first letter of the remaining string)
      参数:
      str - : 被处理的字符串
      preLength - : 去掉的长度
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:27 下午
    • removePreAndLowerFirst

      public static String removePreAndLowerFirst​(CharSequence str, CharSequence prefix)
      [去掉首部指定长度的字符串并将剩余字符串首字母小写](Remove the specified length of the first string and lowercase the first letter of the remaining string)
      参数:
      str - : 被处理的字符串
      prefix - : 前缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:30 下午
    • removePrefix

      public static String removePrefix​(CharSequence str, CharSequence prefix)
      [去掉指定前缀](Remove the specified prefix)
      参数:
      str - : 字符串
      prefix - : 前缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:32 下午
    • removePrefixIgnoreCase

      public static String removePrefixIgnoreCase​(CharSequence str, CharSequence prefix)
      [忽略大小写去掉指定前缀](Ignore case and remove the specified prefix)
      参数:
      str - : 字符串
      prefix - : 前缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:36 下午
    • removeSuffix

      public static String removeSuffix​(CharSequence str, CharSequence suffix)
      参数:
      str - : 字符串
      suffix - : 后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:38 下午
    • removeSufAndLowerFirst

      public static String removeSufAndLowerFirst​(CharSequence str, CharSequence suffix)
      去掉指定后缀,并小写首字母
      参数:
      str - 字符串
      suffix - 后缀
      返回:
      切掉后的字符串,若后缀不是 suffix, 返回原字符串
    • removeSuffixIgnoreCase

      public static String removeSuffixIgnoreCase​(CharSequence str, CharSequence suffix)
      参数:
      str - : 字符串
      suffix - : 后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:38 下午
    • cleanBlank

      public static String cleanBlank​(CharSequence str)
      [清理空白字符](Clean up white space)
      参数:
      str - : 被清理的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/8 7:39 下午
    • strip

      public static String strip​(CharSequence str, CharSequence prefixOrSuffix)
      [去除两边的指定字符串](Remove both sides of the specified string)
      参数:
      str - : 被处理的字符串
      prefixOrSuffix - : 前缀或后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/9 9:09 上午
    • strip

      public static String strip​(CharSequence str, CharSequence prefix, CharSequence suffix)
      [去除两边的指定字符串](Remove both sides of the specified string)
      参数:
      str - : 被处理的字符串
      prefix - : 前缀
      suffix - : 后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 10:09 上午
    • stripIgnoreCase

      public static String stripIgnoreCase​(CharSequence str, CharSequence prefixOrSuffix)
      [去除两边的指定字符串,忽略大小写](Remove both sides of the specified string, ignoring case)
      参数:
      str - : 被处理的字符串
      prefixOrSuffix - : 前缀或后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 10:10 上午
    • stripIgnoreCase

      public static String stripIgnoreCase​(CharSequence str, CharSequence prefix, CharSequence suffix)
      [去除两边的指定字符串,忽略大小写](Remove both sides of the specified string, ignoring case)
      参数:
      str - : 被处理的字符串
      prefix - : 前缀
      suffix - : 后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 10:20 上午
    • addPrefixIfNot

      public static String addPrefixIfNot​(CharSequence str, CharSequence prefix)
      [如果给定字符串不是以prefix开头的,在开头补充 prefix](If the given string does not start with prefix, prefix is added at the beginning)
      参数:
      str - : 字符串
      prefix - : 前缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 10:30 上午
    • addSuffixIfNot

      public static String addSuffixIfNot​(CharSequence str, CharSequence suffix)
      [如果给定字符串不是以suffix结尾的,在尾部补充 suffix](If the given string does not end with suffix, suffix is added at the end)
      参数:
      str - : 字符串
      suffix - : 后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 10:36 上午
    • splitToArray

      public static String[] splitToArray​(CharSequence str, char separator)
      [切分字符串](Segmentation string)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/10 10:50 上午
    • splitToArray

      public static String[] splitToArray​(CharSequence str, char separator, int limit)
      [切分字符串](Segmentation string)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      limit - : 限制分片数
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/10 11:23 上午
    • splitToLong

      public static long[] splitToLong​(CharSequence str, char separator)
      [切分字符串为long数组](Splitting strings into long arrays)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符
      返回:
      long[]
      从以下版本开始:
      2021/7/10 10:57 上午
    • splitToLong

      public static long[] splitToLong​(CharSequence str, CharSequence separator)
      [切分字符串为long数组](Splitting strings into long arrays)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符串
      返回:
      long[]
      从以下版本开始:
      2021/7/10 11:02 上午
    • splitToInt

      public static int[] splitToInt​(CharSequence str, char separator)
      [切分字符串为int数组](Splits a string into an int array)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符
      返回:
      int[]
      从以下版本开始:
      2021/7/10 11:04 上午
    • splitToInt

      public static int[] splitToInt​(CharSequence str, CharSequence separator)
      [切分字符串为int数组](Splits a string into an int array)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符
      返回:
      int[]
      从以下版本开始:
      2021/7/10 11:06 上午
    • splitTrim

      public static List<String> splitTrim​(CharSequence str, char separator)
      [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:42 上午
    • splitTrim

      public static List<String> splitTrim​(CharSequence str, CharSequence separator)
      [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:43 上午
    • splitTrim

      public static List<String> splitTrim​(CharSequence str, char separator, int limit)
      [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      limit - : 限制分片数,-1不限制
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:49 上午
    • splitTrim

      public static List<String> splitTrim​(CharSequence str, CharSequence separator, int limit)
      [切分字符串,去除切分后每个元素两边的空白符,去除空白项](Cut string, remove the blank character on both sides of each element after cutting, remove the blank item)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      limit - : 限制分片数,-1不限制
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 3:33 下午
    • split

      public static List<String> split​(CharSequence str, char separator)
      [切分字符串](Segmentation string)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:10 上午
    • split

      public static List<String> split​(CharSequence str, char separator, int limit)
      [切分字符串,不去除切分后每个元素两边的空白符,不去除空白项](Cut string, do not remove the white space on both sides of each element after cutting, do not remove the white space)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      limit - : 限制分片数,-1不限制
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:25 上午
    • split

      public static List<String> split​(CharSequence str, char separator, boolean isTrim, boolean ignoreEmpty)
      [切分字符串,不限制分片数量](Cut string, unlimited number of pieces)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      isTrim - : 是否去除切分字符串后每个元素两边的空格
      ignoreEmpty - : 是否忽略空串
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:26 上午
    • split

      public static List<String> split​(CharSequence str, char separator, int limit, boolean isTrim, boolean ignoreEmpty)
      [切分字符串](Segmentation string)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      limit - : 限制分片数,-1不限制
      isTrim - : 是否去除切分字符串后每个元素两边的空格
      ignoreEmpty - : 是否忽略空串
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:28 上午
    • split

      public static List<String> split​(CharSequence str, CharSequence separator, int limit, boolean isTrim, boolean ignoreEmpty)
      [切分字符串](Segmentation string)
      参数:
      str - : 被切分的字符串
      separator - : 分隔符字符
      limit - : 限制分片数,-1不限制
      isTrim - : 是否去除切分字符串后每个元素两边的空格
      ignoreEmpty - : 是否忽略空串
      返回:
      java.util.List
      从以下版本开始:
      2021/7/10 11:33 上午
    • split

      public static String[] split​(CharSequence str, CharSequence separator)
      [根据给定长度,将给定字符串截取为多个部分](According to the given length, the given string is intercepted into multiple parts)
      参数:
      str - : 字符串
      separator - : 每一个小节的长度
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/10 11:35 上午
    • split

      public static String[] split​(CharSequence str, int len)
      [根据给定长度,将给定字符串截取为多个部分](According to the given length, the given string is intercepted into multiple parts)
      参数:
      str - : 字符串
      len - : 每一个小节的长度
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/10 11:36 上午
    • cut

      public static String[] cut​(CharSequence str, int partLength)
      [将字符串切分为N等份](Divide a string into N equal parts)
      参数:
      str - : 字符串
      partLength - : 每等份的长度
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/10 11:38 上午
    • subString

      public static String subString​(CharSequence value, int beginIndex, int endIndex)
      [截取字符串](Intercept string)
      参数:
      value - : String
      beginIndex - : 开始的index(包括)
      endIndex - : 结束的index(不包括)
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 4:36 下午
    • subStringByCodePoint

      public static String subStringByCodePoint​(CharSequence value, int beginIndex, int endIndex)
      [通过CodePoint截取字符串,可以截断Emoji](You can truncate Emoji by intercepting strings through codepoint)
      参数:
      value - : String
      beginIndex - : 开始的index(包括)
      endIndex - : 结束的index(不包括)
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 4:39 下午
    • subStringPreGbk

      public static String subStringPreGbk​(CharSequence str, int length, CharSequence suffix)
      [截取部分字符串,这里一个汉字的长度认为是2](Intercept part of the string, where the length of a Chinese character is considered to be 2)
      参数:
      str - : 字符串
      length - : 切割的位置
      suffix - : 切割后加上后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 4:43 下午
    • subStringPre

      public static String subStringPre​(CharSequence string, int toIndexExclude)
      [切割指定位置之前部分的字符串](Cuts the string before the specified position)
      参数:
      string - : 字符串
      toIndexExclude - : 切割到的位置(不包括)
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 4:48 下午
    • subStringSuf

      public static String subStringSuf​(CharSequence string, int fromIndex)
      [切割指定位置之后部分的字符串](Cuts the string after the specified position)
      参数:
      string - : 字符串
      fromIndex - : 切割开始的位置(包括)
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 4:54 下午
    • subStringSufByLength

      public static String subStringSufByLength​(CharSequence string, int length)
      [切割指定长度的后部分的字符串](A string that cuts the last part of the specified length)
      参数:
      string - : 字符串
      length - : 切割长度
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 4:56 下午
    • subStringWithLength

      public static String subStringWithLength​(String input, int fromIndex, int length)
      [截取字符串,从指定位置开始,截取指定长度的字符串](Intercepts the string, starts from the specified position, intercepts the specified length string)
      参数:
      input - : 原始字符串
      fromIndex - : 开始的index,包括
      length - : 要截取的长度
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 5:04 下午
    • subStringBefore

      public static String subStringBefore​(CharSequence string, CharSequence separator, boolean isLastSeparator)
      [截取分隔字符串之前的字符串,不包括分隔字符串](Intercepts the string before the delimited string, excluding the delimited string)
      参数:
      string - : 被查找的字符串
      separator - : 分隔字符串(不包括)
      isLastSeparator - : 是否查找最后一个分隔字符串(多次出现分隔字符串时选取最后一个),true为选取最后一个
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 5:07 下午
    • subStringBefore

      public static String subStringBefore​(CharSequence string, char separator, boolean isLastSeparator)
      [截取分隔字符串之前的字符串,不包括分隔字符串](Intercepts the string before the delimited string, excluding the delimited string)
      参数:
      string - : 被查找的字符串
      separator - : 分隔字符串(不包括)
      isLastSeparator - : 是否查找最后一个分隔字符串(多次出现分隔字符串时选取最后一个),true为选取最后一个
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 5:10 下午
    • subStringAfter

      public static String subStringAfter​(CharSequence string, CharSequence separator, boolean isLastSeparator)
      [截取分隔字符串之后的字符串,不包括分隔字符串](Intercepts the string after the delimited string, excluding the delimited string)
      参数:
      string - : 被查找的字符串
      separator - : 分隔字符串(不包括)
      isLastSeparator - : 是否查找最后一个分隔字符串(多次出现分隔字符串时选取最后一个),true为选取最后一个
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 5:35 下午
    • subStringAfter

      public static String subStringAfter​(CharSequence string, char separator, boolean isLastSeparator)
      [截取分隔字符串之后的字符串,不包括分隔字符串](Intercepts the string after the delimited string, excluding the delimited string)
      参数:
      string - : 被查找的字符串
      separator - : 分隔字符串(不包括)
      isLastSeparator - : 是否查找最后一个分隔字符串(多次出现分隔字符串时选取最后一个),true为选取最后一个
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 5:53 下午
    • subStringBetween

      public static String subStringBetween​(CharSequence str, CharSequence before, CharSequence after)
      [截取指定字符串中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
      参数:
      str - : 被切割的字符串
      before - : 截取开始的字符串标识
      after - : 截取到的字符串标识
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 5:54 下午
    • subStringBetween

      public static String subStringBetween​(CharSequence str, CharSequence beforeAndAfter)
      [截取指定字符串中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
      参数:
      str - : 被切割的字符串
      beforeAndAfter - : 截取开始和结束的字符串标识
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 5:55 下午
    • subStringBetweenAll

      public static String[] subStringBetweenAll​(CharSequence str, CharSequence prefix, CharSequence suffix)
      [截取指定字符串多段中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
      参数:
      str - : 被切割的字符串
      prefix - : 截取开始的字符串标识
      suffix - : 截取到的字符串标识
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/10 5:58 下午
    • subStringBetweenAll

      public static String[] subStringBetweenAll​(CharSequence str, CharSequence prefixAndSuffix)
      [截取指定字符串多段中间部分,不包括标识字符串](Intercepts the middle part of the specified string, excluding the identification string)
      参数:
      str - : 被切割的字符串
      prefixAndSuffix - : 截取开始和结束的字符串标识
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/10 5:59 下午
    • repeat

      public static String repeat​(char repeatValue, int count)
      [重复某一个字符](Repeat a character)
      参数:
      repeatValue - : 被重复的字符
      count - : 重复的数目,如果小于等于0则返回""
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 6:08 下午
    • repeat

      public static String repeat​(CharSequence str, int count)
      [重复某个字符串](Repeat a string)
      参数:
      str - : 被重复的字符
      count - : 重复的数目
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 6:14 下午
    • repeatByLength

      public static String repeatByLength​(CharSequence str, int padLen)
      [重复某个字符串到指定长度](Repeats a string to a specified length)
      参数:
      str - : 被重复的字符
      padLen - : 指定长度
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 6:34 下午
    • repeatAndJoin

      public static String repeatAndJoin​(CharSequence str, int count, CharSequence conjunction)
      [重复某个字符串并通过分界符连接](Repeats a string and concatenates it with a separator)
      参数:
      str - : 被重复的字符串
      count - : 数量
      conjunction - : 分界符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/10 6:36 下午
    • equals

      public static boolean equals​(CharSequence str1, CharSequence str2)
      [比较两个字符串(大小写敏感)。](Compare two strings (case sensitive).)
      参数:
      str1 - : 要比较的字符串1
      str2 - : 要比较的字符串2
      返回:
      boolean
      从以下版本开始:
      2021/7/10 6:48 下午
    • equals

      public static boolean equals​(CharSequence str1, CharSequence str2, boolean ignoreCase)
      [比较两个字符串是否相等。](Compares two strings for equality.)
      参数:
      str1 - : str1 – 要比较的字符串1
      str2 - : 要比较的字符串2
      ignoreCase - : 是否忽略大小写
      返回:
      boolean
      从以下版本开始:
      2021/7/10 6:52 下午
    • equalsIgnoreCase

      public static boolean equalsIgnoreCase​(CharSequence str1, CharSequence str2)
      [比较两个字符串(大小写不敏感)。](Compares two strings (case insensitive).)
      参数:
      str1 - : 要比较的字符串1
      str2 - : 要比较的字符串2
      返回:
      boolean
      从以下版本开始:
      2021/7/10 6:59 下午
    • equalsAnyIgnoreCase

      public static boolean equalsAnyIgnoreCase​(CharSequence str1, CharSequence... arrays)
      [给定字符串是否与提供的中任一字符串相同(忽略大小写),相同则返回true,没有相同的返回false](If the given string is the same as any of the provided strings (regardless of case), true will be returned if it is the same, and false will be returned if it is not the same)
      参数:
      str1 - : 给定需要检查的字符串
      arrays - : 需要参与比对的字符串列表
      返回:
      boolean
      从以下版本开始:
      2021/7/10 7:00 下午
    • equalsAny

      public static boolean equalsAny​(CharSequence str1, CharSequence... arrays)
      [给定字符串是否与提供的中任一字符串相同,相同则返回true,没有相同的返回false](If the given string is the same as any of the provided strings, true will be returned if it is the same, and false will be returned if it is not the same)
      参数:
      str1 - : 给定需要检查的字符串
      arrays - : 需要参与比对的字符串列表
      返回:
      boolean
      从以下版本开始:
      2021/7/10 7:01 下午
    • equalsAny

      public static boolean equalsAny​(CharSequence str1, boolean ignoreCase, CharSequence... array)
      [给定字符串是否与提供的中任一字符串相同,相同则返回true,没有相同的返回false](If the given string is the same as any of the provided strings, true will be returned if it is the same, and false will be returned if it is not the same)
      参数:
      str1 - : 给定需要检查的字符串
      ignoreCase - : 是否忽略大小写
      array - : 需要参与比对的字符串列表
      返回:
      boolean
      从以下版本开始:
      2021/7/10 7:02 下午
    • equalsCharAt

      public static boolean equalsCharAt​(CharSequence string, int position, char value)
      [字符串指定位置的字符是否与给定字符相同](Whether the character at the specified position of the string is the same as the given character)
      参数:
      string - : 字符串
      position - : 位置
      value - : 需要对比的字符
      返回:
      boolean
      从以下版本开始:
      2021/7/10 7:06 下午
    • isSubEquals

      public static boolean isSubEquals​(CharSequence str1, int start1, CharSequence str2, int start2, int length, boolean ignoreCase)
      [截取两个字符串的不同部分(长度一致),判断截取的子串是否相同](Intercepts different parts of two strings (the same length) to determine whether the intercepted substrings are the same)
      参数:
      str1 - : 第一个字符串
      start1 - : 第一个字符串开始的位置
      str2 - : 第二个字符串
      start2 - : 第二个字符串开始的位置
      length - : 截取长度
      ignoreCase - : 是否忽略大小写
      返回:
      boolean
      从以下版本开始:
      2021/7/10 7:10 下午
    • format

      public static String format​(CharSequence template, Object... params)
      [格式化文本, {} 表示占位符](Formatted text, {} represents a placeholder)
      参数:
      template - :文本模板,被替换的部分用 {} 表示,如果模板为null,返回"null"
      params - : 参数值
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/11 8:00 下午
    • indexedFormat

      public static String indexedFormat​(CharSequence pattern, Object... arguments)
      [有序的格式化文本,使用{number}做为占位符](Orderly formatted text, using {number} as a placeholder)
      参数:
      pattern - : 文本格式
      arguments - : 参数
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/11 8:00 下午
    • utf8Bytes

      public static byte[] utf8Bytes​(CharSequence value)
      [编码字符串,编码为UTF-8](Encoding string, encoded as UTF-8)
      参数:
      value - : 字符串
      返回:
      byte[]
      从以下版本开始:
      2021/7/11 8:43 下午
    • bytes

      public static byte[] bytes​(CharSequence value)
      [编码字符串 使用系统默认编码](The encoding string uses the system default encoding)
      参数:
      value - : 字符串
      返回:
      byte[]
      从以下版本开始:
      2021/7/11 8:44 下午
    • bytes

      public static byte[] bytes​(CharSequence value, String charset)
      [编码字符串](Encoding string)
      参数:
      value - : 字符串
      charset - : 字符集,如果此字段为空,则解码的结果取决于平台
      返回:
      byte[]
      从以下版本开始:
      2021/7/11 8:46 下午
    • bytes

      public static byte[] bytes​(CharSequence value, Charset charset)
      [编码字符串](Encoding string)
      参数:
      value - : 字符串
      charset - : 字符集,如果此字段为空,则解码的结果取决于平台
      返回:
      byte[]
      从以下版本开始:
      2021/7/11 8:49 下午
    • byteBuffer

      public static ByteBuffer byteBuffer​(CharSequence value, String charset)
      [字符串转换为byteBuffer](String to ByteBuffer)
      参数:
      value - : 字符串
      charset - : 编码
      返回:
      java.nio.ByteBuffer
      从以下版本开始:
      2021/7/11 8:51 下午
    • wrap

      public static String wrap​(CharSequence value, CharSequence prefixAndSuffix)
      [包装指定字符串](Wrapper specified string)
      参数:
      value - : 被包装的字符串
      prefixAndSuffix - : 前缀和后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 8:54 上午
    • wrap

      public static String wrap​(CharSequence value, CharSequence prefix, CharSequence suffix)
      [包装指定字符串](Wrapper specified string)
      参数:
      value - : 被包装的字符串
      prefix - : 前缀
      suffix - : 后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 8:56 上午
    • wrapAllWithPair

      public static String[] wrapAllWithPair​(CharSequence prefixAndSuffix, CharSequence... values)
      [使用单个字符包装多个字符串](Wrapping multiple strings with a single character)
      参数:
      prefixAndSuffix - : 前缀和后缀
      values - : 多个字符串
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/12 8:57 上午
    • wrapAll

      public static String[] wrapAll​(CharSequence prefix, CharSequence suffix, CharSequence... values)
      [包装多个字符串](Wrapping multiple strings)
      参数:
      prefix - : 前缀
      suffix - : 后缀
      values - : 多个字符串
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/12 8:59 上午
    • wrapIfMissing

      public static String wrapIfMissing​(CharSequence value, CharSequence prefix, CharSequence suffix)
      [包装指定字符串,如果前缀或后缀已经包含对应的字符串,则不再包装](Wrap the specified string. If the prefix or suffix already contains the corresponding string, it is no longer wrapped)
      参数:
      value - : 被包装的字符串
      prefix - : 前缀
      suffix - : 后缀
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 9:00 上午
    • wrapAllWithPairIfMissing

      public static String[] wrapAllWithPairIfMissing​(CharSequence prefixAndSuffix, CharSequence... values)
      [使用成对的字符包装多个字符串,如果已经包装,则不再包装](Use pairs of characters to wrap multiple strings. If they are already wrapped, they are no longer wrapped)
      参数:
      prefixAndSuffix - : 前缀和后缀
      values - : 多个字符串
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/12 9:01 上午
    • wrapAllIfMissing

      public static String[] wrapAllIfMissing​(CharSequence prefix, CharSequence suffix, CharSequence... values)
      [使用成对的字符包装多个字符串,如果已经包装,则不再包装](Use pairs of characters to wrap multiple strings. If they are already wrapped, they are no longer wrapped)
      参数:
      prefix - : 前缀
      suffix - : 后缀
      values - : 多个字符串
      返回:
      java.lang.String[]
      从以下版本开始:
      2021/7/12 9:05 上午
    • unWrap

      public static String unWrap​(CharSequence value, String prefix, String suffix)
      [去掉字符包装,如果未被包装则返回原字符串](Remove the character wrapping, and return the original string if it is not wrapped)
      参数:
      value - : 字符串
      prefix - : 前置字符串
      suffix - : 后置字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 9:06 上午
    • unWrap

      public static String unWrap​(CharSequence value, char prefix, char suffix)
      [去掉字符包装,如果未被包装则返回原字符串](Remove the character wrapping, and return the original string if it is not wrapped)
      参数:
      value - : 字符串
      prefix - : 前置字符
      suffix - : 后置字符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 9:10 上午
    • unWrap

      public static String unWrap​(CharSequence value, char prefixAndSuffix)
      [去掉字符包装,如果未被包装则返回原字符串](Remove the character wrapping, and return the original string if it is not wrapped)
      参数:
      value - : 字符串
      prefixAndSuffix - : 前置和后置字符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 9:11 上午
    • isWrap

      public static boolean isWrap​(CharSequence value, String prefix, String suffix)
      [指定字符串是否被包装](Specifies whether the string is wrapped)
      参数:
      value - : 字符串
      prefix - : 前缀
      suffix - : 后缀
      返回:
      boolean
      从以下版本开始:
      2021/7/12 9:12 上午
    • isWrap

      public static boolean isWrap​(CharSequence str, String wrapper)
      [指定字符串是否被同一字符包装(前后都有这些字符串)](Specifies whether the string is wrapped by the same character (both before and after the string))
      参数:
      str - : 字符串
      wrapper - : 包装字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/12 9:14 上午
    • isWrap

      public static boolean isWrap​(CharSequence str, char wrapper)
      [指定字符串是否被同一字符包装(前后都有这些字符串)](Specifies whether the string is wrapped by the same character (both before and after the string))
      参数:
      str - : 字符串
      wrapper - : 包装字符
      返回:
      boolean
      从以下版本开始:
      2021/7/12 9:15 上午
    • isWrap

      public static boolean isWrap​(CharSequence str, char prefixChar, char suffixChar)
      [指定字符串是否被包装](Specifies whether the string is wrapped)
      参数:
      str - : 字符串
      prefixChar - : 前缀
      suffixChar - : 后缀
      返回:
      boolean
      从以下版本开始:
      2021/7/12 9:16 上午
    • padPre

      public static String padPre​(CharSequence value, int length, CharSequence padStr)
      [补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之](The string is supplemented to meet the specified length. If the supplied string is larger than the specified length, it is truncated)
      参数:
      value - : 字符串
      length - : 长度
      padStr - : 补充的字符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 9:28 上午
    • padPre

      public static String padPre​(CharSequence value, int length, char padChar)
      [补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之](The string is supplemented to meet the specified length. If the supplied string is larger than the specified length, it is truncated)
      参数:
      value - : 字符串
      length - : 长度
      padChar - : 补充的字符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 10:33 上午
    • padAfter

      public static String padAfter​(CharSequence value, int length, char padChar)
      [补充字符串以满足指定长度,如果提供的字符串大于指定长度,截断之](The string is supplemented to meet the specified length. If the supplied string is larger than the specified length, it is truncated)
      参数:
      value - : 字符串,如果为null,直接返回null
      length - : 长度
      padChar - : 补充的字符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 10:36 上午
    • padAfter

      public static String padAfter​(CharSequence value, int length, CharSequence padStr)
      [补充字符串以满足最小长度](Supplement string to meet minimum length)
      参数:
      value - : 字符串,如果为null,直接返回null
      length - : 长度
      padStr - : 补充的字
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 10:50 上午
    • center

      public static String center​(CharSequence value, int size, CharSequence padStr)
      [居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串](Center the string and supplement the specified string on both sides. If the specified length is less than the string, the original string will be returned)
      参数:
      value - : 字符串
      size - : 指定长度
      padStr - : 两边补充的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 2:15 下午
    • center

      public static String center​(CharSequence value, int size, char padChar)
      [居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串](Center the string and supplement the specified string on both sides. If the specified length is less than the string, the original string will be returned)
      参数:
      value - : 字符串
      size - : 指定长度
      padChar - : 两边补充的字符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 2:17 下午
    • center

      public static String center​(CharSequence value, int size)
      [居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串](Center the string and supplement the specified string on both sides. If the specified length is less than the string, the original string will be returned)
      参数:
      value - : 字符串
      size - : 指定长度
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 2:18 下午
    • str

      public static String str​(CharSequence value)
      [CharSequence 转为字符串,null安全](CharSequence to string, null safe)
      参数:
      value - : CharSequence
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/12 2:26 下午
    • count

      public static int count​(CharSequence content, CharSequence strForSearch)
      [统计指定内容中包含指定字符串的数量](Counts the number of specified strings in the specified content)
      参数:
      content - : 被查找的字符串
      strForSearch - : 需要查找的字符串
      返回:
      int
      从以下版本开始:
      2021/7/12 2:31 下午
    • count

      public static int count​(CharSequence content, char charForSearch)
      [统计指定内容中包含指定字符串的数量](Counts the number of specified strings in the specified content)
      参数:
      content - : 内容
      charForSearch - : 被统计的字符
      返回:
      int
      从以下版本开始:
      2021/7/12 2:32 下午
    • compare

      public static int compare​(CharSequence str1, CharSequence str2, boolean nullIsLess)
      [比较两个字符串,用于排序](Compare two strings for sorting)
      参数:
      str1 - : 字符串1
      str2 - : 字符串2
      nullIsLess - : null 值是否排在前(null是否小于非空值
      返回:
      int
      从以下版本开始:
      2021/7/13 2:41 下午
    • compareIgnoreCase

      public static int compareIgnoreCase​(CharSequence str1, CharSequence str2, boolean nullIsLess)
      [比较两个字符串,用于排序,大小写不敏感](Compare two strings for sorting, case insensitive)
      参数:
      str1 - : 字符串1
      str2 - : 字符串2
      nullIsLess - : null 值是否排在前(null是否小于非空值)
      返回:
      int
      从以下版本开始:
      2021/7/13 3:18 下午
    • compareVersion

      public static int compareVersion​(CharSequence value1, CharSequence value2)
      [比较两个版本](Compare the two versions)
      参数:
      value1 - : 版本1
      value2 - : 版本2
      返回:
      int
      从以下版本开始:
      2021/7/13 3:20 下午
    • appendIfMissing

      public static String appendIfMissing​(CharSequence value, CharSequence suffix, CharSequence... suffixes)
      [如果给定字符串不是以给定的一个或多个字符串为结尾,则在尾部添加结尾字符串](If the given string does not end with one or more of the given strings, the ending string is added at the end)
      参数:
      value - : 被检查的字符串
      suffix - : 需要添加到结尾的字符串
      suffixes - : 需要额外检查的结尾字符串,如果以这些中的一个为结尾,则不再添加
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/13 8:08 下午
    • appendIfMissingIgnoreCase

      public static String appendIfMissingIgnoreCase​(CharSequence value, CharSequence suffix, CharSequence... suffixes)
      [如果给定字符串不是以给定的一个或多个字符串为结尾,则在尾部添加结尾字符串](If the given string does not end with one or more of the given strings, the ending string is added at the end)
      参数:
      value - : 被检查的字符串
      suffix - : 需要添加到结尾的字符串
      suffixes - : 需要额外检查的结尾字符串,如果以这些中的一个为结尾,则不再添加
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/13 8:10 下午
    • appendIfMissing

      public static String appendIfMissing​(CharSequence value, CharSequence suffix, boolean ignoreCase, CharSequence... suffixes)
      [如果给定字符串不是以给定的一个或多个字符串为结尾,则在尾部添加结尾字符串](If the given string does not end with one or more of the given strings, the ending string is added at the end)
      参数:
      value - : 被检查的字符串
      suffix - : 需要添加到结尾的字符串
      ignoreCase - : 检查结尾时是否忽略大小写
      suffixes - : 需要额外检查的结尾字符串,如果以这些中的一个为结尾,则不再添加
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/13 8:12 下午
    • prependIfMissing

      public static String prependIfMissing​(CharSequence value, CharSequence prefix, CharSequence... prefixes)
      [如果给定字符串不是以给定的一个或多个字符串为开头,则在首部添加起始字符串](If the given string does not start with one or more given strings, the starting string is added at the beginning)
      参数:
      value - : 被检查的字符串
      prefix - : 需要添加到首部的字符串
      prefixes - : 需要额外检查的首部字符串,如果以这些中的一个为起始,则不再添加
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/13 8:13 下午
    • prependIfMissingIgnoreCase

      public static String prependIfMissingIgnoreCase​(CharSequence str, CharSequence prefix, CharSequence... prefixes)
      [如果给定字符串不是以给定的一个或多个字符串为开头,则在首部添加起始字符串](If the given string does not start with one or more given strings, the starting string is added at the beginning)
      参数:
      str - : 被检查的字符串
      prefix - : 需要添加到首部的字符串
      prefixes - : 需要额外检查的首部字符串,如果以这些中的一个为起始,则不再添加
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/13 8:14 下午
    • prependIfMissing

      public static String prependIfMissing​(CharSequence str, CharSequence prefix, boolean ignoreCase, CharSequence... prefixes)
      [如果给定字符串不是以给定的一个或多个字符串为开头,则在首部添加起始字符串](If the given string does not start with one or more given strings, the starting string is added at the beginning)
      参数:
      str - : 被检查的字符串
      prefix - : 需要添加到首部的字符串
      ignoreCase - : 检查结尾时是否忽略大小写
      prefixes - : 需要额外检查的首部字符串,如果以这些中的一个为起始,则不再添加
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/13 8:15 下午
    • replaceIgnoreCase

      public static String replaceIgnoreCase​(CharSequence value, CharSequence search, CharSequence replacement)
      [替换字符串中的指定字符串,忽略大小写](Replaces the specified string in the string, ignoring case)
      参数:
      value - : 字符串
      search - : 被查找的字符串
      replacement - : 被替换的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 6:28 下午
    • replace

      public static String replace​(CharSequence value, CharSequence search, CharSequence replacement)
      [替换字符串中的指定字符串](Replaces the specified string in the string)
      参数:
      value - : 字符串
      search - : 被查找的字符串
      replacement - : 被替换的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 6:38 下午
    • replace

      public static String replace​(CharSequence value, CharSequence search, CharSequence replacement, boolean ignoreCase)
      [替换字符串中的指定字符串](Replaces the specified string in the string)
      参数:
      value - : 字符串
      search - : 被查找的字符串
      replacement - : 被替换的字符串
      ignoreCase - : 是否忽略大小写
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 6:39 下午
    • replace

      public static String replace​(CharSequence value, int fromIndex, CharSequence search, CharSequence replacement, boolean ignoreCase)
      [替换字符串中的指定字符串](Replaces the specified string in the string)
      参数:
      value - : 字符串
      fromIndex - : 开始位置(包括)
      search - : 被查找的字符串
      replacement - : 被替换的字符串
      ignoreCase - : 是否忽略大小写
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 6:42 下午
    • replace

      public static String replace​(CharSequence value, int startInclude, int endExclude, char replacedChar)
      [替换指定字符串的指定区间内字符为固定字符](Replace the characters in the specified interval of the specified string as fixed characters)
      参数:
      value - : 字符串
      startInclude - : 开始位置(包含)
      endExclude - : 结束位置(不包含)
      replacedChar - : 被替换的字符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 6:46 下午
    • replace

      public static String replace​(CharSequence value, Pattern pattern, Func1<Matcher,​String> replaceFun)
      [替换所有正则匹配的文本,并使用自定义函数决定如何替换](Replace all regular matched text and use custom functions to decide how to replace it)
      参数:
      value - : 要替换的字符串
      pattern - : 用于匹配的正则式
      replaceFun - : 决定如何替换的函数
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 6:58 下午
    • replace

      public static String replace​(CharSequence value, String regex, Func1<Matcher,​String> replaceFun)
      [替换所有正则匹配的文本,并使用自定义函数决定如何替换](Replace all regular matched text and use custom functions to decide how to replace it)
      参数:
      value - : 要替换的字符串
      regex - : 用于匹配的正则式
      replaceFun - : 决定如何替换的函数
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 6:59 下午
    • hide

      public static String hide​(CharSequence value, int startInclude, int endExclude)
      [替换指定字符串的指定区间内字符为"*" 俗称:脱敏功能,后面其他功能](Replace the characters in the specified interval of the specified string as "*", commonly known as desensitization function, followed by other functions)
      参数:
      value - : 字符串
      startInclude - : 开始位置(包含)
      endExclude - : 结束位置(不包含)
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 7:14 下午
    • desensitized

      public static String desensitized​(CharSequence value, DesensitizedUtil.DesensitizedType desensitizedType)
      [脱敏,使用默认的脱敏策略](Desensitization, using the default desensitization strategy)
      参数:
      value - : 字符串
      desensitizedType - : 脱敏类型;可以脱敏:用户id、中文名、身份证号、座机号、手机号、地址、电子邮件、密码
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 7:18 下午
    • replaceChars

      public static String replaceChars​(CharSequence value, String chars, CharSequence replaced)
      [替换字符字符数组中所有的字符为 replaced](Replace all characters in the character array as replaced)
      参数:
      value - : 被检查的字符串
      chars - : 需要替换的字符列表,用一个字符串表示这个字符列表
      replaced - : 替换成的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 7:20 下午
    • replaceChars

      public static String replaceChars​(CharSequence value, char[] chars, CharSequence replaced)
      [替换字符字符数组中所有的字符为 replaced](Replace all characters in the character array as replaced)
      参数:
      value - : 被检查的字符串
      chars - : 需要替换的字符列表
      replaced - : 替换成的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 7:24 下午
    • length

      public static int length​(CharSequence value)
      [获取字符串的长度,如果为null返回0](Gets the length of the string, and returns 0 if NULL)
      参数:
      value - : 字符串
      返回:
      int
      从以下版本开始:
      2021/7/14 7:31 下午
    • byteLength

      public static int byteLength​(CharSequence cs, Charset charset)
      [给定字符串转为bytes后的byte数(byte长度)](The number of bytes (byte length) after the given string is converted to bytes)
      参数:
      cs - : 字符串
      charset - : 编码
      返回:
      int
      从以下版本开始:
      2021/7/14 7:32 下午
    • totalLength

      public static int totalLength​(CharSequence... values)
      [给定字符串数组的总长度](The total length of the given string array)
      参数:
      values - : 字符串数组
      返回:
      int
      从以下版本开始:
      2021/7/14 7:35 下午
    • maxLength

      public static String maxLength​(CharSequence string, int length)
      参数:
      string - :
      length - :
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 7:38 下午
    • firstNonNull

      public <T extends CharSequence> T firstNonNull​(T... values)
      [返回第一个非 null 元素](Returns the first non null element)
      参数:
      values - : 多个元素
      返回:
      T
      从以下版本开始:
      2021/7/14 8:02 下午
    • firstNonEmpty

      public <T extends CharSequence> T firstNonEmpty​(T... values)
      [返回第一个非 empty 元素](Returns the first non empty element)
      参数:
      values - : 多个元素
      返回:
      T
      从以下版本开始:
      2021/7/14 8:04 下午
    • firstNonBlank

      public <T extends CharSequence> T firstNonBlank​(T... values)
      [返回第一个非 blank 元素](Returns the first non blank element)
      参数:
      values - : 多个元素
      返回:
      T
      从以下版本开始:
      2021/7/14 8:07 下午
    • upperFirstAndAddPre

      public static String upperFirstAndAddPre​(CharSequence value, String pre)
      [原字符串首字母大写并在其首部添加指定字符串](Capitalize the original string and add the specified string at the beginning)
      参数:
      value - : 被处理的字符串
      pre - : 添加的首部
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 8:22 下午
    • upperFirst

      public static String upperFirst​(CharSequence value)
      [大写首字母](Capital initial)
      参数:
      value - : 字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 8:23 下午
    • lowerFirst

      public static String lowerFirst​(CharSequence value)
      [小写首字母](Small initial)
      参数:
      value - : 字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 8:24 下午
    • filter

      public static String filter​(CharSequence value, Filter<Character> filter)
      [过滤字符串](Filter strings)
      参数:
      value - : 字符串
      filter - : 过滤器
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/14 9:47 下午
    • isUpperCase

      public static boolean isUpperCase​(CharSequence value)
      [给定字符串中的字母是否全部为大写](Whether all the letters in the given string are uppercase)
      参数:
      value - : 被检查的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/17 2:01 下午
    • isLowerCase

      public static boolean isLowerCase​(CharSequence value)
      [给定字符串中的字母是否全部为小写](Whether all the letters in the given string are lowercase)
      参数:
      value - : 被检查的字符串
      返回:
      boolean
      从以下版本开始:
      2021/7/17 2:12 下午
    • swapCase

      public static String swapCase​(String value)
      [切换给定字符串中的大小写](Toggles the case of a given string)
      参数:
      value - : 字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/17 4:00 下午
    • toUnderlineCase

      public static String toUnderlineCase​(CharSequence value)
      [将驼峰式命名的字符串转换为下划线方式](Convert hump named strings to underscores)
      参数:
      value - : 转换前的驼峰式命名的字符串,也可以为下划线形式
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/17 4:04 下午
    • toSymbolCase

      public static String toSymbolCase​(CharSequence value, char symbol)
      [将驼峰式命名的字符串转换为使用符号连接方式](Convert hump named string to symbolic connection)
      参数:
      value - : 转换前的驼峰式命名的字符串,也可以为符号连接形式
      symbol - : 连接符
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/17 4:10 下午
    • toCamelCase

      public static String toCamelCase​(CharSequence name)
      [将下划线方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。](Converts a string named by underline to hump. If the string named by the pre conversion underline capitalization method is empty, the empty string is returned.)
      参数:
      name - : 转换前的下划线大写方式命名的字符串
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/17 9:01 下午
    • isSurround

      public static boolean isSurround​(CharSequence str, CharSequence prefix, CharSequence suffix)
      [给定字符串是否被字符包围](Whether the given string is surrounded by characters)
      参数:
      str - : 字符串
      prefix - : 前缀
      suffix - : 后缀
      返回:
      boolean
      从以下版本开始:
      2021/7/23 9:26 上午
    • isSurround

      public static boolean isSurround​(CharSequence str, char prefix, char suffix)
      [给定字符串是否被字符包围](Whether the given string is surrounded by characters)
      参数:
      str - : 字符串
      prefix - : 前缀
      suffix - : 后缀
      返回:
      boolean
      从以下版本开始:
      2021/7/23 9:30 上午
    • builder

      public static StringBuilder builder​(CharSequence... values)
      [创建StringBuilder对象](Create StringBuilder object)
      参数:
      values - : 初始字符串列表
      返回:
      java.lang.StringBuilder
      从以下版本开始:
      2021/7/23 9:36 上午
    • strBuilder

      public static StrBuilder strBuilder​(CharSequence... values)
      [创建 StrBuilder 对象](Creating StrBuilder objects)
      参数:
      values - : 初始字符串列表
      返回:
      com.xiaoTools.core.text.stringBuilder.StrBuilder
      从以下版本开始:
      2021/7/23 9:37 上午
    • getGeneralField

      public static String getGeneralField​(CharSequence getOrSetMethodName)
      [获得 set 或 get 或 is 方法对应的标准属性名](Get the standard property name corresponding to the set or get or is method)
      参数:
      getOrSetMethodName - : Get或Set方法名
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/23 9:40 上午
    • genSetter

      public static String genSetter​(CharSequence fieldName)
      [生成 set 方法名](Generate set method name)
      参数:
      fieldName - : 属性名
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/23 9:41 上午
    • genGetter

      public static String genGetter​(CharSequence fieldName)
      [生成 get 方法名](Generate get method name)
      参数:
      fieldName - : 属性名
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/23 9:41 上午
    • concat

      public static String concat​(boolean isNullToEmpty, CharSequence... values)
      [连接多个字符串为一个](Connect multiple strings into one)
      参数:
      isNullToEmpty - : 是否null转为""
      values - : 字符串数组
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/23 10:03 上午
    • brief

      public static String brief​(CharSequence value, int maxLength)
      [将给定字符串,变成 "xxx...xxx" 形式的字符串](Change the given string into a string in the form of "XXX... XXX")
      参数:
      value - : 字符串
      maxLength - : 最大长度
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/23 10:05 上午
    • join

      public static String join​(CharSequence conjunction, Object... values)
      [以 conjunction 为分隔符将多个对象转换为字符串](Convert multiple objects to strings with conjunction as a delimiter)
      参数:
      conjunction - : 分隔符
      values - : 数组
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/23 10:06 上午
    • isAllCharMatch

      public static boolean isAllCharMatch​(CharSequence value, Matcher<Character> matcher)
      [字符串的每一个字符是否都与定义的匹配器匹配](Does each character of the string match the defined matcher)
      参数:
      value - : 字符串
      matcher - : 匹配器
      返回:
      boolean
      从以下版本开始:
      2021/7/23 10:07 上午
    • move

      public static String move​(CharSequence str, int startInclude, int endExclude, int moveLength)
      [循环位移指定位置的字符串为指定距离](Circular displacement the string at the specified position is the specified distance)
      参数:
      str - : 字符串
      startInclude - : 起始位置(包括)
      endExclude - : 结束位置(不包括)
      moveLength - : 移动距离,负数表示左移,正数为右移
      返回:
      java.lang.String
      从以下版本开始:
      2021/7/23 10:09 上午