You are here

protected function Porter2::inR2 in Search API 8

Checks whether the given string is contained in R2.

Parameters

string $string: The string.

Return value

bool TRUE if the string is in R2, FALSE otherwise.

3 calls to Porter2::inR2()
Porter2::step3 in src/Plugin/search_api/processor/Resources/Porter2.php
Implements step 3 of the Porter2 algorithm.
Porter2::step4 in src/Plugin/search_api/processor/Resources/Porter2.php
Implements step 4 of the Porter2 algorithm.
Porter2::step5 in src/Plugin/search_api/processor/Resources/Porter2.php
Implements step 5 of the Porter2 algorithm.

File

src/Plugin/search_api/processor/Resources/Porter2.php, line 548

Class

Porter2
Implements the Porter2 stemming algorithm.

Namespace

Drupal\search_api\Plugin\search_api\processor\Resources

Code

protected function inR2($string) {
  $r2 = substr($this->word, $this->r2);
  return strpos($r2, $string) !== FALSE;
}