-
Notifications
You must be signed in to change notification settings - Fork 67
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
Enhancement: Rainbow.clear? #56
Comments
There's no method in the current version of rainbow for this. But we have PR for exactly this: #54 :) |
Thanks, @sickill. I would vote for a less ponderous name, though, than 'strip_ascii_escape', something like 'clear' or 'wipe', etc. |
@ddoherty03 @sickill The #54 is now merged. Is this issue "fixed" with that? |
It's called |
@sickill, yes indeed. Thanks for getting to this. |
Thanks, all; closing this issue. |
I am using rainbow to build up tables with possibly colored components, and I need to compute the width of a string that may or may not be rainbowized. I would like to have a method on Rainbow that would return just the wrapped string without any escape codes if the string is already wrapped or just the string otherwise.
Then I could calculate the width of an element that may or may not be wrapped with something like
In the meantime, any easy way to do this with current gem?
Also, thanks for a great gem.
The text was updated successfully, but these errors were encountered: