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

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"