diff options
author | Vitaliy Klimin <vklimin@510710.com> | 2018-01-11 17:27:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 17:27:19 +0300 |
commit | b3d54cec21f90b151225f14f9ecd0ea2048ceec9 (patch) | |
tree | dbb6c70c71515b712f4430afe4332bde28e97964 /src/NXP/Stemmer.php | |
parent | 24910f8add42cb281506751ecb916f7a27e1448f (diff) |
Update Stemmer.php
Так будет корректнее.
Diffstat (limited to 'src/NXP/Stemmer.php')
-rw-r--r-- | src/NXP/Stemmer.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/NXP/Stemmer.php b/src/NXP/Stemmer.php index 0188434..73b993c 100644 --- a/src/NXP/Stemmer.php +++ b/src/NXP/Stemmer.php @@ -93,7 +93,7 @@ class Stemmer public static function removeEndings(&$word, $regex, $region) { $prefix = mb_substr($word, 0, $region, 'UTF-8'); - $ending = substr($word, strlen($prefix)); + $ending = mb_substr($word, mb_strlen($prefix, 'UTF-8'), null, 'UTF-8'); if (is_array($regex)) { if (preg_match('/.+[а|я]' . $regex[0] . '/ui', $ending)) { $word = $prefix . preg_replace('/' . $regex[0] . '/ui', '', $ending); |