Skip to content

Commit 5e92101

Browse files
committed
Add Squeeze Out The Extra Space as a ruby til.
1 parent e1a2bd6 commit 5e92101

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
5555
- [Finding The Source of Ruby Methods](ruby/finding-the-source-of-ruby-methods.md)
5656
- [Limit Split](ruby/limit-split.md)
5757
- [Parallel Bundle Install](ruby/parallel-bundle-install.md)
58+
- [Squeeze Out The Extra Space](ruby/squeeze-out-the-extra-space.md)
5859
- [Summing Collections](ruby/summing-collections.md)
5960

6061
### vim

ruby/squeeze-out-the-extra-space.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Squeeze Out The Extra Space
2+
3+
Remove all the excess spaces from a string using the squeeze method:
4+
5+
```ruby
6+
> "this is a string".squeeze(' ')
7+
=> "this is a string"
8+
```

0 commit comments

Comments
 (0)