Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ansi): TruncateLeft #301

Merged
merged 1 commit into from
Dec 10, 2024
Merged

feat(ansi): TruncateLeft #301

merged 1 commit into from
Dec 10, 2024

Conversation

caarlos0
Copy link
Member

Truncate returns the first N chars of the string.
TruncateLeft skips the first N chars of the string, returning the rest.

pretty sure it can be improved.

will be useful for implementing an horizontal scroll in viewport, e.g. charmbracelet/bubbles#240

Truncate returns the first N chars of the string.
TruncateLeft skips the first N chars of the string, returning the rest.
@caarlos0 caarlos0 added the enhancement New feature or request label Dec 10, 2024
Copy link
Member

@aymanbagabas aymanbagabas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @caarlos0!

@aymanbagabas aymanbagabas merged commit e41b682 into main Dec 10, 2024
7 of 8 checks passed
@aymanbagabas aymanbagabas deleted the truncate-left branch December 10, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants