Alwaysgaurav1 opened a new pull request, #1776: URL: https://github.com/apache/commons-lang/pull/1776
## Summary Prevents `StringUtils.left`, `StringUtils.right`, `StringUtils.mid`, and `StringUtils.overlay` from splitting UTF-16 surrogate pairs into malformed lone surrogates. ## Details of Changes - `StringUtils.left`: Backs off the cut by 1 when `splitsSurrogatePair` is true to avoid trailing lone high surrogates. - `StringUtils.right`: Advances start by 1 when `splitsSurrogatePair` is true to avoid leading lone low surrogates. - `StringUtils.mid`: Adjusts start and end boundaries to keep cuts off the middle of surrogate pairs. - `StringUtils.overlay`: Adjusts replacement span boundaries off surrogate pairs. - Added comprehensive unit tests in `StringUtilsSubstringTest` and `StringUtilsTest`. - Added release notes entry in `src/changes/changes.xml`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
