diff --git a/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/MPJStringUtils.java b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/MPJStringUtils.java index 50ec008..790c7d4 100644 --- a/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/MPJStringUtils.java +++ b/mybatis-plus-join-core/src/main/java/com/github/yulichang/toolkit/MPJStringUtils.java @@ -33,14 +33,14 @@ import static java.util.stream.Collectors.joining; * @author hcl * @since 2016-08-18 */ -@SuppressWarnings("ALL") +@SuppressWarnings("unused") public final class MPJStringUtils { /** * 判断是否是中文 */ public static boolean isChinese(String str) { - if(isBlank(str)) + if (isBlank(str)) return false; char c = str.charAt(0); return c >= 0x4E00 && c <= 0x9FA5; @@ -70,13 +70,6 @@ public final class MPJStringUtils { */ private static final Pattern CAPITAL_MODE = Pattern.compile("^[0-9A-Z/_]+$"); - /** - * 字符串去除空白内容 - * - *
- * null
s are handled without exceptions. Two null
- * references are considered to be equal. The comparison is case sensitive.
- *
- *
- * StringUtils.endsWith(null, null) = true - * StringUtils.endsWith(null, "abcdef") = false - * StringUtils.endsWith("def", null) = false - * StringUtils.endsWith("def", "abcdef") = true - * StringUtils.endsWith("def", "ABCDEF") = false - *- * - * - * @param str the String to check, may be null - * @param suffix the suffix to find, may be null - * @return
true
if the String ends with the suffix, case
- * sensitive, or both null
- * @see String#endsWith(String)
- * @since 2.4
- */
- public static boolean endsWith(String str, String suffix) {
- return endsWith(str, suffix, false);
- }
/**
* Check if a String ends with a specified suffix (optionally case
@@ -469,10 +434,8 @@ public final class MPJStringUtils {
* @return ignore
*/
public static String prefixToLower(String rawString, int index) {
- StringBuilder field = new StringBuilder();
- field.append(rawString.substring(0, index).toLowerCase());
- field.append(rawString.substring(index));
- return field.toString();
+ return rawString.substring(0, index).toLowerCase() +
+ rawString.substring(index);
}
/**
@@ -596,42 +559,4 @@ public final class MPJStringUtils {
}
return true;
}
-
- /**
- * SQL 注入字符串去除空白内容:
- * 例1: gtSql("id", "1, 2, 3, 4, 5, 6")
*例1: gtSql("id", "select id from table where name = 'JunJun'")
* - * @param condition - * @param column - * @param inValue - * @return + * @param condition 执行条件 + * @param column 字段 + * @param inValue sql语句 + * @return children */ Children gtSql(boolean condition, R column, String inValue); @@ -183,10 +183,10 @@ public interface FuncStr例1: geSql("id", "1, 2, 3, 4, 5, 6")
*例1: geSql("id", "select id from table where name = 'JunJun'")
* - * @param condition - * @param column - * @param inValue - * @return + * @param condition 执行条件 + * @param column 字段 + * @param inValue sql语句 + * @return children */ Children geSql(boolean condition, R column, String inValue); @@ -202,10 +202,10 @@ public interface FuncStr例1: ltSql("id", "1, 2, 3, 4, 5, 6")
*例1: ltSql("id", "select id from table where name = 'JunJun'")
* - * @param condition - * @param column - * @param inValue - * @return + * @param condition 执行条件 + * @param column 字段 + * @param inValue sql语句 + * @return children */ Children ltSql(boolean condition, R column, String inValue); @@ -221,10 +221,10 @@ public interface FuncStr例1: leSql("id", "1, 2, 3, 4, 5, 6")
*例1: leSql("id", "select id from table where name = 'JunJun'")
* - * @param condition - * @param column - * @param inValue - * @return + * @param condition 执行条件 + * @param column 字段 + * @param inValue sql语句 + * @return children */ Children leSql(boolean condition, R column, String inValue); @@ -240,10 +240,10 @@ public interface FuncStr例1: eqSql("id", "1, 2, 3, 4, 5, 6")
*例1: eqSql("id", "select id from table where name = 'JunJun'")
* - * @param condition - * @param column - * @param inValue - * @return + * @param condition 执行条件 + * @param column 字段 + * @param inValue sql语句 + * @return children */ Children eqSql(boolean condition, R column, String inValue);