console-rs / console-rs/console
Helper function for slicing strings with ansi codes in them.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 144
- Avg merge
- 8h 24m
- Merged PRs (30d)
- 4
Description
The library currently has helper functions for stripping escape codes, and measuring string length with them removed.
It would be useful to have a helper function which can break up a string, inserting escape codes to terminate and resume the styling. This would in particular be useful for multi-line strings being formatted into columned outputs. Like I am trying to do here: https://github.com/Nukesor/comfy-table/issues/91
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing helpers for stripping ANSI escape codes and measuring visible string length. Review the related comfy-table issue for the column-formatting use case, then define how slicing should preserve styling across breaks and multiline output. Done means the helper handles styled strings without corrupting their escape codes and has coverage for the intended cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100