Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #507 mbstring: Fix mb_rtrim() for UTF-8 text (nsfisis)
This PR was merged into the 1.x branch. Discussion ---------- mbstring: Fix mb_rtrim() for UTF-8 text # Component Polyfill-mbstring # Problem `mb_rtrim()` returns an empty string for UTF-8 text. # How to Reproduce ```php echo \Symfony\Polyfill\Mbstring\Mbstring::mb_rtrim(' あいうえお '); // => '' (empty string) ``` Expected result: `' あいうえお'` # Cause The regular expression used in `mb_rtrim()` implementation does not have `u` flag. # Changes * Add `u` flag to the regular expression used in `mb_rtrim()` implementation as `mb_trim()` and `mb_ltrim()` do. * Add tests. Commits ------- 65d1260 mbstring: Fix mb_rtrim() for UTF-8 text
- Loading branch information