Method: Strings::Wrap.display_width
- Defined in:
- lib/strings/wrap.rb
.display_width(string) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Visible width of a string
170 171 172 |
# File 'lib/strings/wrap.rb', line 170 def display_width(string) Unicode::DisplayWidth.of(Strings::ANSI.sanitize(string)) end |