charmbracelet / charmbracelet/x
ansi: right to left truncation option?
Open
- Dominant language
- Go
- Stars
- 314
- Forks
- 94
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 2
Description
Right now, the `Truncate` function iterates over the given string from left to right. It might be nice to have either `TruncateRTL` or `DirectionalTruncate`
The left to right only option that we have now, can cause some issues with right-justified text or right-to-left languages (e.g. arabic)
Example:
" UK" becomes " U..."
Contributor guide
Assessment
This issue has not been assessed yet.