mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-14 08:18:50 +00:00
perf[code]: use NumberUtils instead
This commit is contained in:
1 parent
6294882dfb
commit
1d079b0a7a
3 files changed
+15
-27
No files matched your search
@@ -23,22 +23,23 @@ public enum CodeLanguage {
|
||||
*/
|
||||
Enhance(1),
|
||||
|
||||
Cpp(2),
|
||||
Cpp(1 << 1),
|
||||
|
||||
Go(4),
|
||||
Go(1 << 2),
|
||||
|
||||
JavaScript(8),
|
||||
JavaScript(1 << 3),
|
||||
|
||||
TypeScript(16),
|
||||
TypeScript(1 << 4),
|
||||
|
||||
Lua(32),
|
||||
Lua(1 << 5),
|
||||
|
||||
CSharp(64),
|
||||
CSharp(1 << 6),
|
||||
|
||||
GdScript(128),
|
||||
GdScript(1 << 7),
|
||||
|
||||
Protobuf(256)
|
||||
;
|
||||
Python(1 << 8),
|
||||
|
||||
Protobuf(1 << 12);
|
||||
|
||||
public final int id;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.zfoo.protocol.collection.ArrayUtils;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
@@ -80,7 +79,6 @@ public abstract class StringUtils {
|
||||
|
||||
public static final String EMPTY_JSON = "{}";
|
||||
|
||||
public static final String SEMICOLON_COMMA = ";|,"; //分号或者逗号
|
||||
|
||||
public static final String MULTIPLE_HYPHENS = "-----------------------------------------------------------------------";
|
||||
|
||||
@@ -485,15 +483,4 @@ public abstract class StringUtils {
|
||||
return Character.isWhitespace(ch) || STOP_WORD.contains(ch);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否是正数
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static boolean isNumeric(String str) {
|
||||
Pattern pattern = Pattern.compile("[0-9]*");
|
||||
Matcher isNum = pattern.matcher(str);
|
||||
return isNum.matches();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user