mirror of
https://github.com/jbranchaud/til
synced 2026-07-05 17:00:17 +00:00
Add Squeeze Out The Extra Space as a ruby til.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# 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"
|
||||
```
|
||||
Reference in New Issue
Block a user