strings
strings copied to clipboard
A set of useful functions for transforming strings.
### Describe the problem `Strings.wrap` throws an `IndexError`. ### Steps to reproduce the problem ```ruby Strings.wrap( "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz \e[1m\e[35m zzzzzzz\e[0m \e[1m\e[35mzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz", 62 ) ``` ### Actual behaviour ``` [snip] 8: from...
### Describe the problem This library(and the whole tty ecosystem) is awesome and I really like it, although I found a cornercase that also pollutes [tty-box](https://github.com/piotrmurach/tty-box) library of yours. I...
### Describe the problem When the ANSI sequence is directly wrapped in brackets the brackets are removed from the output. ### Steps to reproduce the problem ``` require 'strings-ansi' str1...
Hi there! `strings` depends on [`unicode_utils`](https://github.com/lang/unicode_utils) (https://github.com/piotrmurach/strings/blob/master/strings.gemspec#L27) `unicode_utils` is not compatible with `frozen_string_literal` https://github.com/lang/unicode_utils/issues/13 and don't seem to be maintained 😢 And so it breaks with : ```sh /Users/nicolas/PROJECTS/CONCERTO/concerto/.bundle/ruby/3.3.0/gems/unicode_utils-1.4.0/lib/unicode_utils/read_cdata.rb:124:in `force_encoding':...
### Describe the change When wrapping lines, reset the insertion index of carried-over ANSI codes to 0 so that they are always applied at the start of the new line....