protected static function Porter2::removeEnding in Porter-Stemmer 8
Removes a given string from the end of the current word.
Does not check whether the ending is actually there.
Parameters
string $word: The word to check.
string $string: The ending to remove.
Return value
string The word without the given ending.
8 calls to Porter2::removeEnding()
- Porter2::step0 in src/
Porter2.php - Search for the longest among the "s" suffixes and removes it.
- 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.
- Porter2::step1c in src/
Porter2.php - Replaces suffix y or Y with i if after non-vowel not @ word begin.
- Porter2::step2 in src/
Porter2.php - Implements step 2 of the Porter2 algorithm.
File
- src/
Porter2.php, line 591
Class
- Porter2
- PHP Implementation of the Porter2 Stemming Algorithm.
Namespace
Drupal\porterstemmerCode
protected static function removeEnding($word, $string) {
return substr($word, 0, -strlen($string));
}