!1219 优化 CharSequenceUtil工具类 startWithAny()、startWithAnyIgnoreCase() 参数命名错误问题

Merge pull request !1219 from KonBAI/v5-dev
This commit is contained in:
Looly 2024-05-14 01:46:40 +00:00 committed by Gitee
commit ec3ac96fdf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -762,8 +762,8 @@ public class CharSequenceUtil {
return false; return false;
} }
for (CharSequence suffix : prefixes) { for (CharSequence prefix : prefixes) {
if (startWith(str, suffix, false)) { if (startWith(str, prefix, false)) {
return true; return true;
} }
} }
@ -775,17 +775,17 @@ public class CharSequenceUtil {
* 给定字符串和数组为空都返回false * 给定字符串和数组为空都返回false
* *
* @param str 给定字符串 * @param str 给定字符串
* @param suffixes 需要检测的开始字符串 * @param prefixes 需要检测的开始字符串
* @return 给定字符串是否以任何一个字符串开始 * @return 给定字符串是否以任何一个字符串开始
* @since 5.8.1 * @since 5.8.1
*/ */
public static boolean startWithAnyIgnoreCase(final CharSequence str, final CharSequence... suffixes) { public static boolean startWithAnyIgnoreCase(final CharSequence str, final CharSequence... prefixes) {
if (isEmpty(str) || ArrayUtil.isEmpty(suffixes)) { if (isEmpty(str) || ArrayUtil.isEmpty(prefixes)) {
return false; return false;
} }
for (final CharSequence suffix : suffixes) { for (final CharSequence prefix : prefixes) {
if (startWith(str, suffix, true)) { if (startWith(str, prefix, true)) {
return true; return true;
} }
} }