guys please help! im having trouble splitting a word into syllables. what i have so far is splitting a word into different compartment bt cant do syllables, i want the code to to be able slice a part of a word,by looking, vowels INSIDE the word!at the end of each vowel, it should slice e.g given word "code" OUTPUT should be "co" ,"de". if itsa setswana word like "motho"(which means a person), i should get output like "mo" and "tho"
this is what i have so far
public void splitter(String word)
{
ArrayList<String> list = new ArrayList<String>();
for (int i = 1; i <= 3; i++) {
int limit = word.length() - i + 1;
for (int j = 0; j < limit; j++) {
list.add(word.substring(j, j+i));
}
}
System.out.println(list);
}