@@ -87,7 +87,7 @@ public final class StringUtils {
|
||||
builder.append(str, start, i);
|
||||
}
|
||||
builder.append(' ');
|
||||
i = whitespaceEnd ;
|
||||
i = whitespaceEnd;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -261,6 +261,19 @@ public final class StringUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean containsEmoji(String str) {
|
||||
for (int i = 0; i < str.length(); ) {
|
||||
int ch = str.codePointAt(i);
|
||||
|
||||
if (ch >= 0x1F300 && ch <= 0x1FAFF)
|
||||
return true;
|
||||
|
||||
i += Character.charCount(ch);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean isVarNameStart(char ch) {
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user