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"
Tweet
Remove all the excess spaces from a string using the squeeze
method:
> "this is a string".squeeze(' ')
=> "this is a string"
Tweet