Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/visual_width/string_ext.rb
Instance Method Summary collapse
Instance Method Details
#truncate(max_length, opts = {}) ⇒ Object
8 9 10 |
# File 'lib/visual_width/string_ext.rb', line 8 def truncate(max_length, opts = {}) VisualWidth.truncate(self, max_length, opts) end |
#width(opts = {}) ⇒ Object
4 5 6 |
# File 'lib/visual_width/string_ext.rb', line 4 def width(opts = {}) VisualWidth.measure(self, opts) end |