getWordOfPrefix method
Implementation
String? getWordOfPrefix(String prefix) {
//returns a word of a particular prefix from the tokens minus the prefix [case insensitive]
for (var i = 0; i < lines.length; i++) {
if (lines[i].toUpperCase().startsWith(prefix.toUpperCase())) {
String word = lines[i];
word = word.substring(prefix.length, word.length);
return word;
}
}
return null;
}