GUI: added mana and other symbols support in choose spell dialog (closes #12155)

This commit is contained in:
Oleg Agafonov 2024-07-27 10:17:22 +04:00
parent 521a0f6e32
commit 2bf6e3e3a2
7 changed files with 26 additions and 36 deletions

View file

@ -983,7 +983,7 @@ public final class CardUtil {
}
public static String getTextWithFirstCharUpperCase(String text) {
if (text != null && text.length() >= 1) {
if (text != null && !text.isEmpty()) {
return Character.toUpperCase(text.charAt(0)) + text.substring(1);
} else {
return text;
@ -991,7 +991,7 @@ public final class CardUtil {
}
public static String getTextWithFirstCharLowerCase(String text) {
if (text != null && text.length() >= 1) {
if (text != null && !text.isEmpty()) {
return Character.toLowerCase(text.charAt(0)) + text.substring(1);
} else {
return text;