Skip to content

feat(ansi): TruncateLeft#301

Merged
aymanbagabas merged 1 commit intomainfrom
truncate-left
Dec 10, 2024
Merged

feat(ansi): TruncateLeft#301
aymanbagabas merged 1 commit intomainfrom
truncate-left

Conversation

@caarlos0
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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!

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