You are here

protected function SearchApiPorter2::removeEnding in Search API 7

Removes a given string from the end of the current word.

Does not check whether the ending is actually there.

Parameters

string $string: The ending to remove.

8 calls to SearchApiPorter2::removeEnding()
SearchApiPorter2::step0 in includes/processor_stemmer.inc
Searches for the longest among the "s" suffixes and removes it.
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.
SearchApiPorter2::step1c in includes/processor_stemmer.inc
Replaces suffix y or Y with i if after non-vowel not @ word begin.
SearchApiPorter2::step2 in includes/processor_stemmer.inc
Implements step 2 of the Porter2 algorithm.

... See full list

File

includes/processor_stemmer.inc, line 681
Contains SearchApiPorterStemmer and SearchApiPorter2.

Class

SearchApiPorter2
Implements the Porter2 stemming algorithm.

Code

protected function removeEnding($string) {
  $this->word = substr($this->word, 0, -strlen($string));
}