1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-02 22:58:01 +00:00
Files
til/ruby/squeeze-out-the-extra-space.md
2015-04-29 20:28:18 -05:00

9 lines
172 B
Markdown

# Squeeze Out The Extra Space
Remove all the excess spaces from a string using the squeeze method:
```ruby
> "this is a string".squeeze(' ')
=> "this is a string"
```