private string getRV(string value)
{
int i;
int j;
// be-safe !!!
if (value == null)
{
return null;
}
i = value.Length - 1;
// RV - IF the second letter is a consoant, RV is the region after
// the next following vowel,
if ((i > 0) && !isVowel(value[1]))
{
// find 1st vowel
for (j = 2; j < i; j++)
{
if (isVowel(value[j]))
{
break;
}
}
if (j < i)
{
return value.Substring(j + 1);
}
}
// RV - OR if the first two letters are vowels, RV is the region
// after the next consoant,
if ((i > 1) &&
isVowel(value[0]) &&
isVowel(value[1]))
{
// find 1st consoant
for (j = 2; j < i; j++)
{
if (!isVowel(value[j]))
{
break;
}
}
if (j < i)
{
return value.Substring(j + 1);
}
}
// RV - AND otherwise (consoant-vowel case) RV is the region after
// the third letter.
if (i > 2)
{
return value.Substring(3);
}
return null;
}