mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
!1219 优化 CharSequenceUtil工具类 startWithAny()、startWithAnyIgnoreCase() 参数命名错误问题
Merge pull request !1219 from KonBAI/v5-dev
This commit is contained in:
commit
ec3ac96fdf
@ -762,8 +762,8 @@ public class CharSequenceUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (CharSequence suffix : prefixes) {
|
||||
if (startWith(str, suffix, false)) {
|
||||
for (CharSequence prefix : prefixes) {
|
||||
if (startWith(str, prefix, false)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -775,17 +775,17 @@ public class CharSequenceUtil {
|
||||
* 给定字符串和数组为空都返回false
|
||||
*
|
||||
* @param str 给定字符串
|
||||
* @param suffixes 需要检测的开始字符串
|
||||
* @param prefixes 需要检测的开始字符串
|
||||
* @return 给定字符串是否以任何一个字符串开始
|
||||
* @since 5.8.1
|
||||
*/
|
||||
public static boolean startWithAnyIgnoreCase(final CharSequence str, final CharSequence... suffixes) {
|
||||
if (isEmpty(str) || ArrayUtil.isEmpty(suffixes)) {
|
||||
public static boolean startWithAnyIgnoreCase(final CharSequence str, final CharSequence... prefixes) {
|
||||
if (isEmpty(str) || ArrayUtil.isEmpty(prefixes)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (final CharSequence suffix : suffixes) {
|
||||
if (startWith(str, suffix, true)) {
|
||||
for (final CharSequence prefix : prefixes) {
|
||||
if (startWith(str, prefix, true)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user