mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-02 16:49:12 +00:00
Simplify the method getIndefiniteArticle
Fix bug
This commit is contained in:
@@ -16,10 +16,8 @@ public final class LanguageUtil {
|
||||
*/
|
||||
public static String getIndefiniteArticle(String string) {
|
||||
char first = Character.toLowerCase(string.charAt(0));
|
||||
if (allUpperCase(string)) {
|
||||
if (first == 'f' || first == 'l' | first == 'm' || first == 'n' || first == 's') {
|
||||
if (allUpperCase(string) && (first == 'f' || first == 'l' || first == 'm' || first == 'n' || first == 's')) {
|
||||
return "an";
|
||||
}
|
||||
}
|
||||
|
||||
boolean vowel = first == 'a' || first == 'e' || first == 'i' || first == 'o' || first == 'u';
|
||||
|
||||
Reference in New Issue
Block a user