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