v0.0.7
All checks were successful
CI/CD / build-deploy (pull_request) Successful in 11s

This commit is contained in:
Timi
2026-06-03 00:05:40 +08:00
parent 65929ae6f2
commit ceb781292d
2 changed files with 15 additions and 11 deletions

View File

@@ -75,8 +75,8 @@ public class Text {
* @return true 时全部其他字符串和比较字符串一致
*/
public static boolean eqAnd(String string, String... other) {
for (int i = 0; i < other.length; i++) {
if (!string.equals(other[i])) {
for (String s : other) {
if (!string.equals(s)) {
return false;
}
}
@@ -91,8 +91,8 @@ public class Text {
* @return true 时其他字符串存在和比较字符串一致
*/
public static boolean eqOr(String string, String... other) {
for (int i = 0; i < other.length; i++) {
if (!string.equals(other[i])) {
for (String s : other) {
if (!string.equals(s)) {
return false;
}
}
@@ -107,8 +107,8 @@ public class Text {
* @return true 时全部其他字符串和比较字符串一致
*/
public static boolean eqIgnoreCaseAnd(String string, String... other) {
for (int i = 0; i < other.length; i++) {
if (!string.equalsIgnoreCase(other[i])) {
for (String s : other) {
if (!string.equalsIgnoreCase(s)) {
return false;
}
}
@@ -123,8 +123,8 @@ public class Text {
* @return true 时其他字符串存在和比较字符串一致
*/
public static boolean eqIgnoreCaseOr(String string, String... other) {
for (int i = 0; i < other.length; i++) {
if (string.equalsIgnoreCase(other[i])) {
for (String s : other) {
if (string.equalsIgnoreCase(s)) {
return true;
}
}
@@ -141,8 +141,8 @@ public class Text {
public static boolean containsIgnoreCase(String string, String... other) {
String stringUpper = string.toUpperCase();
String stringLower = string.toLowerCase();
for (int i = 0; i < other.length; i++) {
if (stringLower.contains(other[i].toLowerCase()) || stringUpper.contains(other[i].toUpperCase())) {
for (String s : other) {
if (stringLower.contains(s.toLowerCase()) || stringUpper.contains(s.toUpperCase())) {
return true;
}
}
@@ -403,4 +403,8 @@ public class Text {
public static String underscoreClassName(Class<?> clazz) {
return camelCase2underscore(clazz.getSimpleName());
}
public static String bizClassName(Class<?> clazz) {
return underscoreClassName(clazz).toUpperCase();
}
}