Class: String
- Inherits:
-
Object
- Object
- String
- Includes:
- CLIMarkdown::Colors
- Defined in:
- lib/mdless/string.rb,
lib/mdless/colors.rb
Overview
String helpers
Constant Summary
Constants included from CLIMarkdown::Colors
CLIMarkdown::Colors::COLORS, CLIMarkdown::Colors::ESCAPE_REGEX
Instance Method Summary collapse
Methods included from CLIMarkdown::Colors
#blackout, #c, #last_color_code, #size_clean, #uncolor, #uncolor!, #wrap
Instance Method Details
#scrub ⇒ Object
5 6 7 |
# File 'lib/mdless/string.rb', line 5 def scrub encode('utf-16', invalid: :replace).encode('utf-8') end |
#scrub! ⇒ Object
9 10 11 |
# File 'lib/mdless/string.rb', line 9 def scrub! replace scrub end |