8000 ansi: right to left truncation option? · Issue #201 · charmbracelet/x · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ansi: right to left truncation option? #201
@bashbunni

Description

@bashbunni

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..."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0