Module: SimpleCommandDispatcher::Helpers::TrimAll
- Included in:
- Camelize, Services::CommandNamespaceService
- Defined in:
- lib/simple_command_dispatcher/helpers/trim_all.rb
Instance Method Summary collapse
-
#trim_all(string) ⇒ String
Removes all whitespace from the given string, including Unicode whitespace.
Instance Method Details
#trim_all(string) ⇒ String
Removes all whitespace from the given string, including Unicode whitespace
10 11 12 13 |
# File 'lib/simple_command_dispatcher/helpers/trim_all.rb', line 10 def trim_all(string) # Using Unicode property \p{Space} to match all Unicode whitespace characters string.gsub(/\p{Space}+/, '') end |