Esempio n. 1
0
bool is_word(CFSWString s) {
    if ((has_vowel(s) == true) &&
            (s.GetLength() == make_char_string(s).GetLength()) &&
            (s.GetLength() > 1))
        return true;
    return false;
}
Esempio n. 2
0
CFSWString syllabify2(CFSWString s) {
    CFSWString res;

    for (INTPTR i = 0; i < s.GetLength(); i++) {
        CFSWString c = s.GetAt(i);
        if (is_consonant(c) && is_vowel(s.GetAt(i - 1)) && is_vowel(s.GetAt(i + 1)))
            res += d;
        if (is_vowel(c) && is_vowel(s.GetAt(i - 1)) && is_vowel(s.GetAt(i + 1)) && c.ToLower() == s.GetAt(i + 1))
            res += d;
        if (is_consonant(c) && is_consonant(s.GetAt(i - 1)) && is_vowel(s.GetAt(i + 1)) && has_vowel(res)) //küsitav
            res += d;
        res += c;
    }
    return res;
}