singularize static method
Singularize a word (basic implementation)
Implementation
static String singularize(String word) {
if (word.endsWith('ies')) return '${word.substring(0, word.length - 3)}y';
if (word.endsWith('es')) return word.substring(0, word.length - 2);
if (word.endsWith('s')) return word.substring(0, word.length - 1);
return word;
}