You are here

protected function Porter2::validLi in Search API 8

Checks whether the given string is a valid -li prefix.

Parameters

string $string: The string to check.

Return value

bool TRUE if the given string is a valid -li prefix, FALSE otherwise.

1 call to Porter2::validLi()
Porter2::step2 in src/Plugin/search_api/processor/Resources/Porter2.php
Implements step 2 of the Porter2 algorithm.

File

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

Class

Porter2
Implements the Porter2 stemming algorithm.

Namespace

Drupal\search_api\Plugin\search_api\processor\Resources

Code

protected function validLi($string) {
  return in_array($string, [
    'c',
    'd',
    'e',
    'g',
    'h',
    'k',
    'm',
    'n',
    'r',
    't',
  ]);
}