-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve truncate efficiency and fix OBOE in truncate_and_remove_front (…
…#22591) * Skip walking string for truncate when byte len is <= char limit * Fix `truncate_and_remove_front` returning string that is `max_chars + 1` in length. Now more consistent with `truncate_and_trailoff` behavior. * Fix `truncate_and_remove_front` adding ellipsis when max_chars == char length Release Notes: - N/A
- Loading branch information
Showing
3 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters