`StripStr` doesn't appear to maintain state across calls to `strip_next`.
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 171
- Forks
- 44
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 6
Description
When I pass "\x1b[" to anstream's StripStr::strip_next (and consume the iterator) , then call it again with "38;", the "38;" is not stripped as I would expect but is returned from the iterator. Printing out the StripStr shows that it is in the Ground state after the first call.
When I use StripBytes instead, the "38;" is stripped as I expected.
Contributor guide
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 at anstream's StripStr::strip_next entry point and reproduce the two-call sequence with "\x1b[" followed by "38;", consuming each iterator. Compare its state and output with StripBytes; done means StripStr preserves the incomplete escape state and strips the continuation consistently, with coverage for this sequence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100