You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The description of ansi.TruncateLeft seems to indicate length is the length of the string returned but it's actually the number of characters that get removed (see @caarlos0 's PR)
When truncating 0 characters, the entire string should be returned but it returns an empty string instead
Describe the bug
ansi.TruncateLeft
seems to indicatelength
is the length of the string returned but it's actually the number of characters that get removed (see @caarlos0 's PR)Fix: #328
Source Code
Running
ansi.TruncateLeft("abc", 0, "")
returns""
Expected behavior
It should return
"abc"
The text was updated successfully, but these errors were encountered: