mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
9 lines
172 B
Markdown
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"
|
|
```
|