mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
!1220 优化 CharSequenceUtil工具类 startWithAny()、startWithAnyIgnoreCase() 参数命名错误问题
Merge pull request !1220 from KonBAI/v6-dev
This commit is contained in:
commit
6e94ec8c34
@ -404,8 +404,8 @@ public class CharSequenceUtil extends StrValidator {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (final CharSequence suffix : prefixes) {
|
||||
if (startWith(str, suffix, false)) {
|
||||
for (final CharSequence prefix : prefixes) {
|
||||
if (startWith(str, prefix, false)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -417,17 +417,17 @@ public class CharSequenceUtil extends StrValidator {
|
||||
* 给定字符串和数组为空都返回false
|
||||
*
|
||||
* @param str 给定字符串
|
||||
* @param suffixes 需要检测的开始字符串
|
||||
* @param prefixes 需要检测的开始字符串
|
||||
* @return 给定字符串是否以任何一个字符串开始
|
||||
* @since 6.0.0
|
||||
*/
|
||||
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…
x
Reference in New Issue
Block a user