From 824460e5c576b92e9763d32802398b9e82de1e2f Mon Sep 17 00:00:00 2001 From: Looly Date: Wed, 29 Nov 2023 10:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCharSequenceUtil=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E5=92=8C=E5=BC=95=E7=94=A8=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../cn/hutool/core/text/CharSequenceUtil.java | 530 +++++++++--------- 2 files changed, 263 insertions(+), 268 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 267aa6943..961ee4de4 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * 【cache 】 Cache增加get重载,可自定义超时时间(issue#I8G0DL@Gitee) * 【cache 】 JWT#sign增加重载,可选是否增加默认的typ参数(issue#3386@Github) * 【db 】 增加识别OpenGauss的驱动类(issue#I8K6C0@Gitee) +* 【core 】 修复CharSequenceUtil注释和引用,避免循环引用 ### 🐞Bug修复 * 【core 】 修复LocalDateTime#parseDate未判断空问题问题(issue#I8FN7F@Gitee) diff --git a/hutool-core/src/main/java/cn/hutool/core/text/CharSequenceUtil.java b/hutool-core/src/main/java/cn/hutool/core/text/CharSequenceUtil.java index 495fcc9e6..6b48d9120 100755 --- a/hutool-core/src/main/java/cn/hutool/core/text/CharSequenceUtil.java +++ b/hutool-core/src/main/java/cn/hutool/core/text/CharSequenceUtil.java @@ -10,13 +10,7 @@ import cn.hutool.core.lang.func.Func1; import cn.hutool.core.text.finder.CharFinder; import cn.hutool.core.text.finder.Finder; import cn.hutool.core.text.finder.StrFinder; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.CharUtil; -import cn.hutool.core.util.CharsetUtil; -import cn.hutool.core.util.DesensitizedUtil; -import cn.hutool.core.util.NumberUtil; -import cn.hutool.core.util.ReUtil; -import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.*; import java.nio.ByteBuffer; import java.nio.charset.Charset; @@ -65,10 +59,10 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #isEmpty(CharSequence)} 的区别是: @@ -111,10 +105,10 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #isNotEmpty(CharSequence)} 的区别是: @@ -136,10 +130,10 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #isAllBlank(CharSequence...)} 的区别在于:

@@ -171,10 +165,10 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #hasBlank(CharSequence...)} 的区别在于:

@@ -208,10 +202,10 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #isBlank(CharSequence)} 的区别是:该方法不校验空白字符。

@@ -238,10 +232,10 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #isNotBlank(CharSequence)} 的区别是:该方法不校验空白字符。

@@ -350,11 +344,11 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #isAllEmpty(CharSequence...)} 的区别在于:

@@ -386,11 +380,11 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #hasEmpty(CharSequence...)} 的区别在于:

@@ -422,11 +416,11 @@ public class CharSequenceUtil { * *

例:

* * *

注意:该方法与 {@link #isAllEmpty(CharSequence...)} 的区别在于:

@@ -534,11 +528,11 @@ public class CharSequenceUtil { * 除去字符串头尾部的空白,如果字符串是{@code null},返回{@code ""}。 * *
-	 * StrUtil.trimToEmpty(null)          = ""
-	 * StrUtil.trimToEmpty("")            = ""
-	 * StrUtil.trimToEmpty("     ")       = ""
-	 * StrUtil.trimToEmpty("abc")         = "abc"
-	 * StrUtil.trimToEmpty("    abc    ") = "abc"
+	 * CharSequenceUtil.trimToEmpty(null)          = ""
+	 * CharSequenceUtil.trimToEmpty("")            = ""
+	 * CharSequenceUtil.trimToEmpty("     ")       = ""
+	 * CharSequenceUtil.trimToEmpty("abc")         = "abc"
+	 * CharSequenceUtil.trimToEmpty("    abc    ") = "abc"
 	 * 
* * @param str 字符串 @@ -553,11 +547,11 @@ public class CharSequenceUtil { * 除去字符串头尾部的空白,如果字符串是{@code null}或者"",返回{@code null}。 * *
-	 * StrUtil.trimToNull(null)          = null
-	 * StrUtil.trimToNull("")            = null
-	 * StrUtil.trimToNull("     ")       = null
-	 * StrUtil.trimToNull("abc")         = "abc"
-	 * StrUtil.trimToEmpty("    abc    ") = "abc"
+	 * CharSequenceUtil.trimToNull(null)          = null
+	 * CharSequenceUtil.trimToNull("")            = null
+	 * CharSequenceUtil.trimToNull("     ")       = null
+	 * CharSequenceUtil.trimToNull("abc")         = "abc"
+	 * CharSequenceUtil.trimToEmpty("    abc    ") = "abc"
 	 * 
* * @param str 字符串 @@ -1169,17 +1163,17 @@ public class CharSequenceUtil { * 指定范围内查找字符串,忽略大小写
* *
-	 * StrUtil.indexOfIgnoreCase(null, *, *)          = -1
-	 * StrUtil.indexOfIgnoreCase(*, null, *)          = -1
-	 * StrUtil.indexOfIgnoreCase("", "", 0)           = 0
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "A", 0)  = 0
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", 0)  = 2
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "AB", 0) = 1
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", 3)  = 5
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", 9)  = -1
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", -1) = 2
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "", 2)   = 2
-	 * StrUtil.indexOfIgnoreCase("abc", "", 9)        = -1
+	 * CharSequenceUtil.indexOfIgnoreCase(null, *, *)          = -1
+	 * CharSequenceUtil.indexOfIgnoreCase(*, null, *)          = -1
+	 * CharSequenceUtil.indexOfIgnoreCase("", "", 0)           = 0
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "A", 0)  = 0
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", 0)  = 2
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "AB", 0) = 1
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", 3)  = 5
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", 9)  = -1
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", -1) = 2
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "", 2)   = 2
+	 * CharSequenceUtil.indexOfIgnoreCase("abc", "", 9)        = -1
 	 * 
* * @param str 字符串 @@ -1195,17 +1189,17 @@ public class CharSequenceUtil { * 指定范围内查找字符串 * *
-	 * StrUtil.indexOfIgnoreCase(null, *, *)          = -1
-	 * StrUtil.indexOfIgnoreCase(*, null, *)          = -1
-	 * StrUtil.indexOfIgnoreCase("", "", 0)           = 0
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "A", 0)  = 0
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", 0)  = 2
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "AB", 0) = 1
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", 3)  = 5
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", 9)  = -1
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "B", -1) = 2
-	 * StrUtil.indexOfIgnoreCase("aabaabaa", "", 2)   = 2
-	 * StrUtil.indexOfIgnoreCase("abc", "", 9)        = -1
+	 * CharSequenceUtil.indexOfIgnoreCase(null, *, *)          = -1
+	 * CharSequenceUtil.indexOfIgnoreCase(*, null, *)          = -1
+	 * CharSequenceUtil.indexOfIgnoreCase("", "", 0)           = 0
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "A", 0)  = 0
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", 0)  = 2
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "AB", 0) = 1
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", 3)  = 5
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", 9)  = -1
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "B", -1) = 2
+	 * CharSequenceUtil.indexOfIgnoreCase("aabaabaa", "", 2)   = 2
+	 * CharSequenceUtil.indexOfIgnoreCase("abc", "", 9)        = -1
 	 * 
* * @param str 字符串 @@ -1230,7 +1224,7 @@ public class CharSequenceUtil { */ public static int indexOf(CharSequence text, CharSequence searchStr, int from, boolean ignoreCase) { if (isEmpty(text) || isEmpty(searchStr)) { - if (StrUtil.equals(text, searchStr)) { + if (CharSequenceUtil.equals(text, searchStr)) { return 0; } else { return INDEX_NOT_FOUND; @@ -1278,7 +1272,7 @@ public class CharSequenceUtil { */ public static int lastIndexOf(CharSequence text, CharSequence searchStr, int from, boolean ignoreCase) { if (isEmpty(text) || isEmpty(searchStr)) { - if (StrUtil.equals(text, searchStr)) { + if (CharSequenceUtil.equals(text, searchStr)) { return 0; } else { return INDEX_NOT_FOUND; @@ -1298,17 +1292,17 @@ public class CharSequenceUtil { * 例子(*代表任意字符): * *
-	 * StrUtil.ordinalIndexOf(null, *, *)          = -1
-	 * StrUtil.ordinalIndexOf(*, null, *)          = -1
-	 * StrUtil.ordinalIndexOf("", "", *)           = 0
-	 * StrUtil.ordinalIndexOf("aabaabaa", "a", 1)  = 0
-	 * StrUtil.ordinalIndexOf("aabaabaa", "a", 2)  = 1
-	 * StrUtil.ordinalIndexOf("aabaabaa", "b", 1)  = 2
-	 * StrUtil.ordinalIndexOf("aabaabaa", "b", 2)  = 5
-	 * StrUtil.ordinalIndexOf("aabaabaa", "ab", 1) = 1
-	 * StrUtil.ordinalIndexOf("aabaabaa", "ab", 2) = 4
-	 * StrUtil.ordinalIndexOf("aabaabaa", "", 1)   = 0
-	 * StrUtil.ordinalIndexOf("aabaabaa", "", 2)   = 0
+	 * CharSequenceUtil.ordinalIndexOf(null, *, *)          = -1
+	 * CharSequenceUtil.ordinalIndexOf(*, null, *)          = -1
+	 * CharSequenceUtil.ordinalIndexOf("", "", *)           = 0
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "a", 1)  = 0
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "a", 2)  = 1
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "b", 1)  = 2
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "b", 2)  = 5
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "ab", 1) = 1
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "ab", 2) = 4
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "", 1)   = 0
+	 * CharSequenceUtil.ordinalIndexOf("aabaabaa", "", 2)   = 0
 	 * 
* * @param str 被检查的字符串,可以为null @@ -2106,13 +2100,13 @@ public class CharSequenceUtil { * 切割指定长度的后部分的字符串 * *
-	 * StrUtil.subSufByLength("abcde", 3)      =    "cde"
-	 * StrUtil.subSufByLength("abcde", 0)      =    ""
-	 * StrUtil.subSufByLength("abcde", -5)     =    ""
-	 * StrUtil.subSufByLength("abcde", -1)     =    ""
-	 * StrUtil.subSufByLength("abcde", 5)       =    "abcde"
-	 * StrUtil.subSufByLength("abcde", 10)     =    "abcde"
-	 * StrUtil.subSufByLength(null, 3)               =    null
+	 * CharSequenceUtil.subSufByLength("abcde", 3)      =    "cde"
+	 * CharSequenceUtil.subSufByLength("abcde", 0)      =    ""
+	 * CharSequenceUtil.subSufByLength("abcde", -5)     =    ""
+	 * CharSequenceUtil.subSufByLength("abcde", -1)     =    ""
+	 * CharSequenceUtil.subSufByLength("abcde", 5)       =    "abcde"
+	 * CharSequenceUtil.subSufByLength("abcde", 10)     =    "abcde"
+	 * CharSequenceUtil.subSufByLength(null, 3)               =    null
 	 * 
* * @param string 字符串 @@ -2156,14 +2150,14 @@ public class CharSequenceUtil { * 如果分隔字符串为空串"",则返回空串,如果分隔字符串未找到,返回原字符串,举例如下: * *
-	 * StrUtil.subBefore(null, *, false)      = null
-	 * StrUtil.subBefore("", *, false)        = ""
-	 * StrUtil.subBefore("abc", "a", false)   = ""
-	 * StrUtil.subBefore("abcba", "b", false) = "a"
-	 * StrUtil.subBefore("abc", "c", false)   = "ab"
-	 * StrUtil.subBefore("abc", "d", false)   = "abc"
-	 * StrUtil.subBefore("abc", "", false)    = ""
-	 * StrUtil.subBefore("abc", null, false)  = "abc"
+	 * CharSequenceUtil.subBefore(null, *, false)      = null
+	 * CharSequenceUtil.subBefore("", *, false)        = ""
+	 * CharSequenceUtil.subBefore("abc", "a", false)   = ""
+	 * CharSequenceUtil.subBefore("abcba", "b", false) = "a"
+	 * CharSequenceUtil.subBefore("abc", "c", false)   = "ab"
+	 * CharSequenceUtil.subBefore("abc", "d", false)   = "abc"
+	 * CharSequenceUtil.subBefore("abc", "", false)    = ""
+	 * CharSequenceUtil.subBefore("abc", null, false)  = "abc"
 	 * 
* * @param string 被查找的字符串 @@ -2198,12 +2192,12 @@ public class CharSequenceUtil { * 如果分隔字符串未找到,返回原字符串,举例如下: * *
-	 * StrUtil.subBefore(null, *, false)      = null
-	 * StrUtil.subBefore("", *, false)        = ""
-	 * StrUtil.subBefore("abc", 'a', false)   = ""
-	 * StrUtil.subBefore("abcba", 'b', false) = "a"
-	 * StrUtil.subBefore("abc", 'c', false)   = "ab"
-	 * StrUtil.subBefore("abc", 'd', false)   = "abc"
+	 * CharSequenceUtil.subBefore(null, *, false)      = null
+	 * CharSequenceUtil.subBefore("", *, false)        = ""
+	 * CharSequenceUtil.subBefore("abc", 'a', false)   = ""
+	 * CharSequenceUtil.subBefore("abcba", 'b', false) = "a"
+	 * CharSequenceUtil.subBefore("abc", 'c', false)   = "ab"
+	 * CharSequenceUtil.subBefore("abc", 'd', false)   = "abc"
 	 * 
* * @param string 被查找的字符串 @@ -2234,14 +2228,14 @@ public class CharSequenceUtil { * 如果分隔字符串为空串(null或""),则返回空串,如果分隔字符串未找到,返回空串,举例如下: * *
-	 * StrUtil.subAfter(null, *, false)      = null
-	 * StrUtil.subAfter("", *, false)        = ""
-	 * StrUtil.subAfter(*, null, false)      = ""
-	 * StrUtil.subAfter("abc", "a", false)   = "bc"
-	 * StrUtil.subAfter("abcba", "b", false) = "cba"
-	 * StrUtil.subAfter("abc", "c", false)   = ""
-	 * StrUtil.subAfter("abc", "d", false)   = ""
-	 * StrUtil.subAfter("abc", "", false)    = "abc"
+	 * CharSequenceUtil.subAfter(null, *, false)      = null
+	 * CharSequenceUtil.subAfter("", *, false)        = ""
+	 * CharSequenceUtil.subAfter(*, null, false)      = ""
+	 * CharSequenceUtil.subAfter("abc", "a", false)   = "bc"
+	 * CharSequenceUtil.subAfter("abcba", "b", false) = "cba"
+	 * CharSequenceUtil.subAfter("abc", "c", false)   = ""
+	 * CharSequenceUtil.subAfter("abc", "d", false)   = ""
+	 * CharSequenceUtil.subAfter("abc", "", false)    = "abc"
 	 * 
* * @param string 被查找的字符串 @@ -2272,12 +2266,12 @@ public class CharSequenceUtil { * 如果分隔字符串为空串(null或""),则返回空串,如果分隔字符串未找到,返回空串,举例如下: * *
-	 * StrUtil.subAfter(null, *, false)      = null
-	 * StrUtil.subAfter("", *, false)        = ""
-	 * StrUtil.subAfter("abc", 'a', false)   = "bc"
-	 * StrUtil.subAfter("abcba", 'b', false) = "cba"
-	 * StrUtil.subAfter("abc", 'c', false)   = ""
-	 * StrUtil.subAfter("abc", 'd', false)   = ""
+	 * CharSequenceUtil.subAfter(null, *, false)      = null
+	 * CharSequenceUtil.subAfter("", *, false)        = ""
+	 * CharSequenceUtil.subAfter("abc", 'a', false)   = "bc"
+	 * CharSequenceUtil.subAfter("abcba", 'b', false) = "cba"
+	 * CharSequenceUtil.subAfter("abc", 'c', false)   = ""
+	 * CharSequenceUtil.subAfter("abc", 'd', false)   = ""
 	 * 
* * @param string 被查找的字符串 @@ -2304,16 +2298,16 @@ public class CharSequenceUtil { * 栗子: * *
-	 * StrUtil.subBetween("wx[b]yz", "[", "]") = "b"
-	 * StrUtil.subBetween(null, *, *)          = null
-	 * StrUtil.subBetween(*, null, *)          = null
-	 * StrUtil.subBetween(*, *, null)          = null
-	 * StrUtil.subBetween("", "", "")          = ""
-	 * StrUtil.subBetween("", "", "]")         = null
-	 * StrUtil.subBetween("", "[", "]")        = null
-	 * StrUtil.subBetween("yabcz", "", "")     = ""
-	 * StrUtil.subBetween("yabcz", "y", "z")   = "abc"
-	 * StrUtil.subBetween("yabczyabcz", "y", "z")   = "abc"
+	 * CharSequenceUtil.subBetween("wx[b]yz", "[", "]") = "b"
+	 * CharSequenceUtil.subBetween(null, *, *)          = null
+	 * CharSequenceUtil.subBetween(*, null, *)          = null
+	 * CharSequenceUtil.subBetween(*, *, null)          = null
+	 * CharSequenceUtil.subBetween("", "", "")          = ""
+	 * CharSequenceUtil.subBetween("", "", "]")         = null
+	 * CharSequenceUtil.subBetween("", "[", "]")        = null
+	 * CharSequenceUtil.subBetween("yabcz", "", "")     = ""
+	 * CharSequenceUtil.subBetween("yabcz", "y", "z")   = "abc"
+	 * CharSequenceUtil.subBetween("yabczyabcz", "y", "z")   = "abc"
 	 * 
* * @param str 被切割的字符串 @@ -2347,12 +2341,12 @@ public class CharSequenceUtil { * 栗子: * *
-	 * StrUtil.subBetween(null, *)            = null
-	 * StrUtil.subBetween("", "")             = ""
-	 * StrUtil.subBetween("", "tag")          = null
-	 * StrUtil.subBetween("tagabctag", null)  = null
-	 * StrUtil.subBetween("tagabctag", "")    = ""
-	 * StrUtil.subBetween("tagabctag", "tag") = "abc"
+	 * CharSequenceUtil.subBetween(null, *)            = null
+	 * CharSequenceUtil.subBetween("", "")             = ""
+	 * CharSequenceUtil.subBetween("", "tag")          = null
+	 * CharSequenceUtil.subBetween("tagabctag", null)  = null
+	 * CharSequenceUtil.subBetween("tagabctag", "")    = ""
+	 * CharSequenceUtil.subBetween("tagabctag", "tag") = "abc"
 	 * 
* * @param str 被切割的字符串 @@ -2370,17 +2364,17 @@ public class CharSequenceUtil { * 栗子: * *
-	 * StrUtil.subBetweenAll("wx[b]y[z]", "[", "]") 		= ["b","z"]
-	 * StrUtil.subBetweenAll(null, *, *)          			= []
-	 * StrUtil.subBetweenAll(*, null, *)          			= []
-	 * StrUtil.subBetweenAll(*, *, null)          			= []
-	 * StrUtil.subBetweenAll("", "", "")          			= []
-	 * StrUtil.subBetweenAll("", "", "]")         			= []
-	 * StrUtil.subBetweenAll("", "[", "]")        			= []
-	 * StrUtil.subBetweenAll("yabcz", "", "")     			= []
-	 * StrUtil.subBetweenAll("yabcz", "y", "z")   			= ["abc"]
-	 * StrUtil.subBetweenAll("yabczyabcz", "y", "z")   		= ["abc","abc"]
-	 * StrUtil.subBetweenAll("[yabc[zy]abcz]", "[", "]");   = ["zy"]           重叠时只截取内部,
+	 * CharSequenceUtil.subBetweenAll("wx[b]y[z]", "[", "]") 		= ["b","z"]
+	 * CharSequenceUtil.subBetweenAll(null, *, *)          			= []
+	 * CharSequenceUtil.subBetweenAll(*, null, *)          			= []
+	 * CharSequenceUtil.subBetweenAll(*, *, null)          			= []
+	 * CharSequenceUtil.subBetweenAll("", "", "")          			= []
+	 * CharSequenceUtil.subBetweenAll("", "", "]")         			= []
+	 * CharSequenceUtil.subBetweenAll("", "[", "]")        			= []
+	 * CharSequenceUtil.subBetweenAll("yabcz", "", "")     			= []
+	 * CharSequenceUtil.subBetweenAll("yabcz", "y", "z")   			= ["abc"]
+	 * CharSequenceUtil.subBetweenAll("yabczyabcz", "y", "z")   		= ["abc","abc"]
+	 * CharSequenceUtil.subBetweenAll("[yabc[zy]abcz]", "[", "]");   = ["zy"]           重叠时只截取内部,
 	 * 
* * @param str 被切割的字符串 @@ -2425,15 +2419,15 @@ public class CharSequenceUtil { * 栗子: * *
-	 * StrUtil.subBetweenAll(null, *)          			= []
-	 * StrUtil.subBetweenAll(*, null)          			= []
-	 * StrUtil.subBetweenAll(*, *)          			= []
-	 * StrUtil.subBetweenAll("", "")          			= []
-	 * StrUtil.subBetweenAll("", "#")         			= []
-	 * StrUtil.subBetweenAll("gotanks", "")     		= []
-	 * StrUtil.subBetweenAll("#gotanks#", "#")   		= ["gotanks"]
-	 * StrUtil.subBetweenAll("#hello# #world#!", "#")   = ["hello", "world"]
-	 * StrUtil.subBetweenAll("#hello# world#!", "#");   = ["hello"]
+	 * CharSequenceUtil.subBetweenAll(null, *)          			= []
+	 * CharSequenceUtil.subBetweenAll(*, null)          			= []
+	 * CharSequenceUtil.subBetweenAll(*, *)          			= []
+	 * CharSequenceUtil.subBetweenAll("", "")          			= []
+	 * CharSequenceUtil.subBetweenAll("", "#")         			= []
+	 * CharSequenceUtil.subBetweenAll("gotanks", "")     		= []
+	 * CharSequenceUtil.subBetweenAll("#gotanks#", "#")   		= ["gotanks"]
+	 * CharSequenceUtil.subBetweenAll("#hello# #world#!", "#")   = ["hello", "world"]
+	 * CharSequenceUtil.subBetweenAll("#hello# world#!", "#");   = ["hello"]
 	 * 
* * @param str 被切割的字符串 @@ -2452,9 +2446,9 @@ public class CharSequenceUtil { * 重复某个字符 * *
-	 * StrUtil.repeat('e', 0)  = ""
-	 * StrUtil.repeat('e', 3)  = "eee"
-	 * StrUtil.repeat('e', -2) = ""
+	 * CharSequenceUtil.repeat('e', 0)  = ""
+	 * CharSequenceUtil.repeat('e', 3)  = "eee"
+	 * CharSequenceUtil.repeat('e', -2) = ""
 	 * 
* * @param c 被重复的字符 @@ -2522,7 +2516,7 @@ public class CharSequenceUtil { return null; } if (padLen <= 0) { - return StrUtil.EMPTY; + return CharSequenceUtil.EMPTY; } final int strLen = str.length(); if (strLen == padLen) { @@ -2543,9 +2537,9 @@ public class CharSequenceUtil { * 重复某个字符串并通过分界符连接 * *
-	 * StrUtil.repeatAndJoin("?", 5, ",")   = "?,?,?,?,?"
-	 * StrUtil.repeatAndJoin("?", 0, ",")   = ""
-	 * StrUtil.repeatAndJoin("?", 5, null) = "?????"
+	 * CharSequenceUtil.repeatAndJoin("?", 5, ",")   = "?,?,?,?,?"
+	 * CharSequenceUtil.repeatAndJoin("?", 0, ",")   = ""
+	 * CharSequenceUtil.repeatAndJoin("?", 5, null) = "?????"
 	 * 
* * @param str 被重复的字符串 @@ -3071,10 +3065,10 @@ public class CharSequenceUtil { * 同:leftPad (org.apache.commons.lang3.leftPad) * *
-	 * StrUtil.padPre(null, *, *);//null
-	 * StrUtil.padPre("1", 3, "ABC");//"AB1"
-	 * StrUtil.padPre("123", 2, "ABC");//"12"
-	 * StrUtil.padPre("1039", -1, "0");//"103"
+	 * CharSequenceUtil.padPre(null, *, *);//null
+	 * CharSequenceUtil.padPre("1", 3, "ABC");//"AB1"
+	 * CharSequenceUtil.padPre("123", 2, "ABC");//"12"
+	 * CharSequenceUtil.padPre("1039", -1, "0");//"103"
 	 * 
* * @param str 字符串 @@ -3102,9 +3096,9 @@ public class CharSequenceUtil { * 同:leftPad (org.apache.commons.lang3.leftPad) * *
-	 * StrUtil.padPre(null, *, *);//null
-	 * StrUtil.padPre("1", 3, '0');//"001"
-	 * StrUtil.padPre("123", 2, '0');//"12"
+	 * CharSequenceUtil.padPre(null, *, *);//null
+	 * CharSequenceUtil.padPre("1", 3, '0');//"001"
+	 * CharSequenceUtil.padPre("123", 2, '0');//"12"
 	 * 
* * @param str 字符串 @@ -3131,10 +3125,10 @@ public class CharSequenceUtil { * 补充字符串以满足最小长度,如果提供的字符串大于指定长度,截断之 * *
-	 * StrUtil.padAfter(null, *, *);//null
-	 * StrUtil.padAfter("1", 3, '0');//"100"
-	 * StrUtil.padAfter("123", 2, '0');//"23"
-	 * StrUtil.padAfter("123", -1, '0')//"" 空串
+	 * CharSequenceUtil.padAfter(null, *, *);//null
+	 * CharSequenceUtil.padAfter("1", 3, '0');//"100"
+	 * CharSequenceUtil.padAfter("123", 2, '0');//"23"
+	 * CharSequenceUtil.padAfter("123", -1, '0')//"" 空串
 	 * 
* * @param str 字符串,如果为{@code null},直接返回null @@ -3161,9 +3155,9 @@ public class CharSequenceUtil { * 补充字符串以满足最小长度 * *
-	 * StrUtil.padAfter(null, *, *);//null
-	 * StrUtil.padAfter("1", 3, "ABC");//"1AB"
-	 * StrUtil.padAfter("123", 2, "ABC");//"23"
+	 * CharSequenceUtil.padAfter(null, *, *);//null
+	 * CharSequenceUtil.padAfter("1", 3, "ABC");//"1AB"
+	 * CharSequenceUtil.padAfter("123", 2, "ABC");//"23"
 	 * 
* * @param str 字符串,如果为{@code null},直接返回null @@ -3193,12 +3187,12 @@ public class CharSequenceUtil { * 居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串 * *
-	 * StrUtil.center(null, *)   = null
-	 * StrUtil.center("", 4)     = "    "
-	 * StrUtil.center("ab", -1)  = "ab"
-	 * StrUtil.center("ab", 4)   = " ab "
-	 * StrUtil.center("abcd", 2) = "abcd"
-	 * StrUtil.center("a", 4)    = " a  "
+	 * CharSequenceUtil.center(null, *)   = null
+	 * CharSequenceUtil.center("", 4)     = "    "
+	 * CharSequenceUtil.center("ab", -1)  = "ab"
+	 * CharSequenceUtil.center("ab", 4)   = " ab "
+	 * CharSequenceUtil.center("abcd", 2) = "abcd"
+	 * CharSequenceUtil.center("a", 4)    = " a  "
 	 * 
* * @param str 字符串 @@ -3214,14 +3208,14 @@ public class CharSequenceUtil { * 居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串 * *
-	 * StrUtil.center(null, *, *)     = null
-	 * StrUtil.center("", 4, ' ')     = "    "
-	 * StrUtil.center("ab", -1, ' ')  = "ab"
-	 * StrUtil.center("ab", 4, ' ')   = " ab "
-	 * StrUtil.center("abcd", 2, ' ') = "abcd"
-	 * StrUtil.center("a", 4, ' ')    = " a  "
-	 * StrUtil.center("a", 4, 'y')   = "yayy"
-	 * StrUtil.center("abc", 7, ' ')   = "  abc  "
+	 * CharSequenceUtil.center(null, *, *)     = null
+	 * CharSequenceUtil.center("", 4, ' ')     = "    "
+	 * CharSequenceUtil.center("ab", -1, ' ')  = "ab"
+	 * CharSequenceUtil.center("ab", 4, ' ')   = " ab "
+	 * CharSequenceUtil.center("abcd", 2, ' ') = "abcd"
+	 * CharSequenceUtil.center("a", 4, ' ')    = " a  "
+	 * CharSequenceUtil.center("a", 4, 'y')   = "yayy"
+	 * CharSequenceUtil.center("abc", 7, ' ')   = "  abc  "
 	 * 
* * @param str 字符串 @@ -3248,15 +3242,15 @@ public class CharSequenceUtil { * 居中字符串,两边补充指定字符串,如果指定长度小于字符串,则返回原字符串 * *
-	 * StrUtil.center(null, *, *)     = null
-	 * StrUtil.center("", 4, " ")     = "    "
-	 * StrUtil.center("ab", -1, " ")  = "ab"
-	 * StrUtil.center("ab", 4, " ")   = " ab "
-	 * StrUtil.center("abcd", 2, " ") = "abcd"
-	 * StrUtil.center("a", 4, " ")    = " a  "
-	 * StrUtil.center("a", 4, "yz")   = "yayz"
-	 * StrUtil.center("abc", 7, null) = "  abc  "
-	 * StrUtil.center("abc", 7, "")   = "  abc  "
+	 * CharSequenceUtil.center(null, *, *)     = null
+	 * CharSequenceUtil.center("", 4, " ")     = "    "
+	 * CharSequenceUtil.center("ab", -1, " ")  = "ab"
+	 * CharSequenceUtil.center("ab", 4, " ")   = " ab "
+	 * CharSequenceUtil.center("abcd", 2, " ") = "abcd"
+	 * CharSequenceUtil.center("a", 4, " ")    = " a  "
+	 * CharSequenceUtil.center("a", 4, "yz")   = "yayz"
+	 * CharSequenceUtil.center("abc", 7, null) = "  abc  "
+	 * CharSequenceUtil.center("abc", 7, "")   = "  abc  "
 	 * 
* * @param str 字符串 @@ -3300,13 +3294,13 @@ public class CharSequenceUtil { * 参数为 {@code null} 或者 "" 返回 {@code 0}. * *
-	 * StrUtil.count(null, *)       = 0
-	 * StrUtil.count("", *)         = 0
-	 * StrUtil.count("abba", null)  = 0
-	 * StrUtil.count("abba", "")    = 0
-	 * StrUtil.count("abba", "a")   = 2
-	 * StrUtil.count("abba", "ab")  = 1
-	 * StrUtil.count("abba", "xxx") = 0
+	 * CharSequenceUtil.count(null, *)       = 0
+	 * CharSequenceUtil.count("", *)         = 0
+	 * CharSequenceUtil.count("abba", null)  = 0
+	 * CharSequenceUtil.count("abba", "")    = 0
+	 * CharSequenceUtil.count("abba", "a")   = 2
+	 * CharSequenceUtil.count("abba", "ab")  = 1
+	 * CharSequenceUtil.count("abba", "xxx") = 0
 	 * 
* * @param content 被查找的字符串 @@ -3356,16 +3350,16 @@ public class CharSequenceUtil { * 比较两个字符串,用于排序 * *
-	 * StrUtil.compare(null, null, *)     = 0
-	 * StrUtil.compare(null , "a", true)  < 0
-	 * StrUtil.compare(null , "a", false) > 0
-	 * StrUtil.compare("a", null, true)   > 0
-	 * StrUtil.compare("a", null, false)  < 0
-	 * StrUtil.compare("abc", "abc", *)   = 0
-	 * StrUtil.compare("a", "b", *)       < 0
-	 * StrUtil.compare("b", "a", *)       > 0
-	 * StrUtil.compare("a", "B", *)       > 0
-	 * StrUtil.compare("ab", "abc", *)    < 0
+	 * CharSequenceUtil.compare(null, null, *)     = 0
+	 * CharSequenceUtil.compare(null , "a", true)  < 0
+	 * CharSequenceUtil.compare(null , "a", false) > 0
+	 * CharSequenceUtil.compare("a", null, true)   > 0
+	 * CharSequenceUtil.compare("a", null, false)  < 0
+	 * CharSequenceUtil.compare("abc", "abc", *)   = 0
+	 * CharSequenceUtil.compare("a", "b", *)       < 0
+	 * CharSequenceUtil.compare("b", "a", *)       > 0
+	 * CharSequenceUtil.compare("a", "B", *)       > 0
+	 * CharSequenceUtil.compare("ab", "abc", *)    < 0
 	 * 
* * @param str1 字符串1 @@ -3390,18 +3384,18 @@ public class CharSequenceUtil { * 比较两个字符串,用于排序,大小写不敏感 * *
-	 * StrUtil.compareIgnoreCase(null, null, *)     = 0
-	 * StrUtil.compareIgnoreCase(null , "a", true)  < 0
-	 * StrUtil.compareIgnoreCase(null , "a", false) > 0
-	 * StrUtil.compareIgnoreCase("a", null, true)   > 0
-	 * StrUtil.compareIgnoreCase("a", null, false)  < 0
-	 * StrUtil.compareIgnoreCase("abc", "abc", *)   = 0
-	 * StrUtil.compareIgnoreCase("abc", "ABC", *)   = 0
-	 * StrUtil.compareIgnoreCase("a", "b", *)       < 0
-	 * StrUtil.compareIgnoreCase("b", "a", *)       > 0
-	 * StrUtil.compareIgnoreCase("a", "B", *)       < 0
-	 * StrUtil.compareIgnoreCase("A", "b", *)       < 0
-	 * StrUtil.compareIgnoreCase("ab", "abc", *)    < 0
+	 * CharSequenceUtil.compareIgnoreCase(null, null, *)     = 0
+	 * CharSequenceUtil.compareIgnoreCase(null , "a", true)  < 0
+	 * CharSequenceUtil.compareIgnoreCase(null , "a", false) > 0
+	 * CharSequenceUtil.compareIgnoreCase("a", null, true)   > 0
+	 * CharSequenceUtil.compareIgnoreCase("a", null, false)  < 0
+	 * CharSequenceUtil.compareIgnoreCase("abc", "abc", *)   = 0
+	 * CharSequenceUtil.compareIgnoreCase("abc", "ABC", *)   = 0
+	 * CharSequenceUtil.compareIgnoreCase("a", "b", *)       < 0
+	 * CharSequenceUtil.compareIgnoreCase("b", "a", *)       > 0
+	 * CharSequenceUtil.compareIgnoreCase("a", "B", *)       < 0
+	 * CharSequenceUtil.compareIgnoreCase("A", "b", *)       < 0
+	 * CharSequenceUtil.compareIgnoreCase("ab", "abc", *)    < 0
 	 * 
* * @param str1 字符串1 @@ -3427,14 +3421,14 @@ public class CharSequenceUtil { * null版本排在最小:即: * *
-	 * StrUtil.compareVersion(null, "v1") < 0
-	 * StrUtil.compareVersion("v1", "v1")  = 0
-	 * StrUtil.compareVersion(null, null)   = 0
-	 * StrUtil.compareVersion("v1", null) > 0
-	 * StrUtil.compareVersion("1.0.0", "1.0.2") < 0
-	 * StrUtil.compareVersion("1.0.2", "1.0.2a") < 0
-	 * StrUtil.compareVersion("1.13.0", "1.12.1c") > 0
-	 * StrUtil.compareVersion("V0.0.20170102", "V0.0.20170101") > 0
+	 * CharSequenceUtil.compareVersion(null, "v1") < 0
+	 * CharSequenceUtil.compareVersion("v1", "v1")  = 0
+	 * CharSequenceUtil.compareVersion(null, null)   = 0
+	 * CharSequenceUtil.compareVersion("v1", null) > 0
+	 * CharSequenceUtil.compareVersion("1.0.0", "1.0.2") < 0
+	 * CharSequenceUtil.compareVersion("1.0.2", "1.0.2a") < 0
+	 * CharSequenceUtil.compareVersion("1.13.0", "1.12.1c") > 0
+	 * CharSequenceUtil.compareVersion("V0.0.20170102", "V0.0.20170101") > 0
 	 * 
* * @param version1 版本1 @@ -3828,13 +3822,13 @@ public class CharSequenceUtil { * 俗称:脱敏功能,后面其他功能,可以见:DesensitizedUtil(脱敏工具类) * *
-	 * StrUtil.hide(null,*,*)=null
-	 * StrUtil.hide("",0,*)=""
-	 * StrUtil.hide("jackduan@163.com",-1,4)   ****duan@163.com
-	 * StrUtil.hide("jackduan@163.com",2,3)    ja*kduan@163.com
-	 * StrUtil.hide("jackduan@163.com",3,2)    jackduan@163.com
-	 * StrUtil.hide("jackduan@163.com",16,16)  jackduan@163.com
-	 * StrUtil.hide("jackduan@163.com",16,17)  jackduan@163.com
+	 * CharSequenceUtil.hide(null,*,*)=null
+	 * CharSequenceUtil.hide("",0,*)=""
+	 * CharSequenceUtil.hide("jackduan@163.com",-1,4)   ****duan@163.com
+	 * CharSequenceUtil.hide("jackduan@163.com",2,3)    ja*kduan@163.com
+	 * CharSequenceUtil.hide("jackduan@163.com",3,2)    jackduan@163.com
+	 * CharSequenceUtil.hide("jackduan@163.com",16,16)  jackduan@163.com
+	 * CharSequenceUtil.hide("jackduan@163.com",16,17)  jackduan@163.com
 	 * 
* * @param str 字符串 @@ -3851,16 +3845,16 @@ public class CharSequenceUtil { * 脱敏,使用默认的脱敏策略 * *
-	 * StrUtil.desensitized("100", DesensitizedUtil.DesensitizedType.USER_ID)) =  "0"
-	 * StrUtil.desensitized("段正淳", DesensitizedUtil.DesensitizedType.CHINESE_NAME)) = "段**"
-	 * StrUtil.desensitized("51343620000320711X", DesensitizedUtil.DesensitizedType.ID_CARD)) = "5***************1X"
-	 * StrUtil.desensitized("09157518479", DesensitizedUtil.DesensitizedType.FIXED_PHONE)) = "0915*****79"
-	 * StrUtil.desensitized("18049531999", DesensitizedUtil.DesensitizedType.MOBILE_PHONE)) = "180****1999"
-	 * StrUtil.desensitized("北京市海淀区马连洼街道289号", DesensitizedUtil.DesensitizedType.ADDRESS)) = "北京市海淀区马********"
-	 * StrUtil.desensitized("duandazhi-jack@gmail.com.cn", DesensitizedUtil.DesensitizedType.EMAIL)) = "d*************@gmail.com.cn"
-	 * StrUtil.desensitized("1234567890", DesensitizedUtil.DesensitizedType.PASSWORD)) = "**********"
-	 * StrUtil.desensitized("苏D40000", DesensitizedUtil.DesensitizedType.CAR_LICENSE)) = "苏D4***0"
-	 * StrUtil.desensitized("11011111222233333256", DesensitizedType.BANK_CARD)) = "1101 **** **** **** 3256"
+	 * CharSequenceUtil.desensitized("100", DesensitizedUtil.DesensitizedType.USER_ID)) =  "0"
+	 * CharSequenceUtil.desensitized("段正淳", DesensitizedUtil.DesensitizedType.CHINESE_NAME)) = "段**"
+	 * CharSequenceUtil.desensitized("51343620000320711X", DesensitizedUtil.DesensitizedType.ID_CARD)) = "5***************1X"
+	 * CharSequenceUtil.desensitized("09157518479", DesensitizedUtil.DesensitizedType.FIXED_PHONE)) = "0915*****79"
+	 * CharSequenceUtil.desensitized("18049531999", DesensitizedUtil.DesensitizedType.MOBILE_PHONE)) = "180****1999"
+	 * CharSequenceUtil.desensitized("北京市海淀区马连洼街道289号", DesensitizedUtil.DesensitizedType.ADDRESS)) = "北京市海淀区马********"
+	 * CharSequenceUtil.desensitized("duandazhi-jack@gmail.com.cn", DesensitizedUtil.DesensitizedType.EMAIL)) = "d*************@gmail.com.cn"
+	 * CharSequenceUtil.desensitized("1234567890", DesensitizedUtil.DesensitizedType.PASSWORD)) = "**********"
+	 * CharSequenceUtil.desensitized("苏D40000", DesensitizedUtil.DesensitizedType.CAR_LICENSE)) = "苏D4***0"
+	 * CharSequenceUtil.desensitized("11011111222233333256", DesensitizedType.BANK_CARD)) = "1101 **** **** **** 3256"
 	 * 
* * @param str 字符串 @@ -4005,7 +3999,7 @@ public class CharSequenceUtil { */ @SuppressWarnings("unchecked") public static T firstNonEmpty(T... strs) { - return ArrayUtil.firstMatch(StrUtil::isNotEmpty, strs); + return ArrayUtil.firstMatch(CharSequenceUtil::isNotEmpty, strs); } /** @@ -4019,7 +4013,7 @@ public class CharSequenceUtil { */ @SuppressWarnings("unchecked") public static T firstNonBlank(T... strs) { - return ArrayUtil.firstMatch(StrUtil::isNotBlank, strs); + return ArrayUtil.firstMatch(CharSequenceUtil::isNotBlank, strs); } // ------------------------------------------------------------------------ lower and upper @@ -4161,9 +4155,9 @@ public class CharSequenceUtil { * 切换给定字符串中的大小写。大写转小写,小写转大写。 * *
-	 * StrUtil.swapCase(null)                 = null
-	 * StrUtil.swapCase("")                   = ""
-	 * StrUtil.swapCase("The dog has a BONE") = "tHE DOG HAS A bone"
+	 * CharSequenceUtil.swapCase(null)                 = null
+	 * CharSequenceUtil.swapCase("")                   = ""
+	 * CharSequenceUtil.swapCase("The dog has a BONE") = "tHE DOG HAS A bone"
 	 * 
* * @param str 字符串 @@ -4257,7 +4251,7 @@ public class CharSequenceUtil { * @return 是否包围,空串不包围 */ public static boolean isSurround(CharSequence str, CharSequence prefix, CharSequence suffix) { - if (StrUtil.isBlank(str)) { + if (CharSequenceUtil.isBlank(str)) { return false; } if (str.length() < (prefix.length() + suffix.length())) { @@ -4277,7 +4271,7 @@ public class CharSequenceUtil { * @return 是否包围,空串不包围 */ public static boolean isSurround(CharSequence str, char prefix, char suffix) { - if (StrUtil.isBlank(str)) { + if (CharSequenceUtil.isBlank(str)) { return false; } if (str.length() < 2) { @@ -4462,7 +4456,7 @@ public class CharSequenceUtil { * @since 3.2.3 */ public static boolean isAllCharMatch(CharSequence value, Matcher matcher) { - if (StrUtil.isBlank(value)) { + if (CharSequenceUtil.isBlank(value)) { return false; } for (int i = value.length(); --i >= 0; ) {