Created
October 14, 2011 11:37
-
-
Save timothyandrew/1286872 to your computer and use it in GitHub Desktop.
remove spaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
str = " this is some text with spaces in it " | |
puts str.split.join | |
#Output: thisissometextwithspacesinit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment