You are here

protected static function Porter2::containsVowel in Porter-Stemmer 8

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 Porter2::containsVowel()
Porter2::step1a in src/Porter2.php
Handles various suffixes, of which the longest is replaced.
Porter2::step1b in src/Porter2.php
Handles various suffixes, of which the longest is replaced.

File

src/Porter2.php, line 604

Class

Porter2
PHP Implementation of the Porter2 Stemming Algorithm.

Namespace

Drupal\porterstemmer

Code

protected static function containsVowel($string) {
  $inc = 0;
  $return = FALSE;
  while ($inc < strlen($string)) {
    if (self::isVowel($inc, $string)) {
      $return = TRUE;
      break;
    }
    $inc++;
  }
  return $return;
}