go-runewidth
go-runewidth copied to clipboard
Add TruncatePrefix
Hello.
I have added a new TruncatePrefix in addition to the Truncate and TruncateLeft method.
For example, when displaying a file pathname in the terminal, the string on the right side is more important for the information.
In such cases, one may want to truncate from the left side.
TruncateLeft might be a more appropriate name for this method, but since it already existed, I chose TruncatePrefix.
Looks good to me. I'll look into it later.