go-runewidth icon indicating copy to clipboard operation
go-runewidth copied to clipboard

Add TruncatePrefix

Open umlx5h opened this issue 1 year ago • 1 comments

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.

umlx5h avatar May 06 '24 10:05 umlx5h

Looks good to me. I'll look into it later.

mattn avatar Sep 25 '25 16:09 mattn