mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
172 B
172 B
Squeeze Out The Extra Space
Remove all the excess spaces from a string using the squeeze method:
> "this is a string".squeeze(' ')
=> "this is a string"