protected function SearchApiPorter2::containsVowel in Search API 7
Checks whether the given string contains a vowel.
Parameters
string $string: The string to check.
Return value
bool TRUE if the string contains a vowel, FALSE otherwise.
2 calls to SearchApiPorter2::containsVowel()
- SearchApiPorter2::step1a in includes/
processor_stemmer.inc - Handles various suffixes, of which the longest is replaced.
- SearchApiPorter2::step1b in includes/
processor_stemmer.inc - Handles various suffixes, of which the longest is replaced.
File
- includes/
processor_stemmer.inc, line 694 - Contains SearchApiPorterStemmer and SearchApiPorter2.
Class
- SearchApiPorter2
- Implements the Porter2 stemming algorithm.
Code
protected function containsVowel($string) {
$inc = 0;
$return = FALSE;
while ($inc < strlen($string)) {
if ($this
->isVowel($inc, $string)) {
$return = TRUE;
break;
}
$inc++;
}
return $return;
}