Skip to content

Instantly share code, notes, and snippets.

@yuki24
Created October 17, 2011 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuki24/1292615 to your computer and use it in GitHub Desktop.
Save yuki24/1292615 to your computer and use it in GitHub Desktop.
quick string examples
ruby-1.9.2-p290 :001 > %w{b k o n s u m t m t y m a i a i o y m n i}.length
=> 21
ruby-1.9.2-p290 :002 > "b k o n s u m t m t y m a i a i o y m n i".length
=> 41
ruby-1.9.2-p290 :003 > %w{b k o n s u m t m t y m a i a i o y m n i}
=> ["b", "k", "o", "n", "s", "u", "m", "t", "m", "t", "y", "m", "a", "i", "a", "i", "o", "y", "m", "n", "i"]
ruby-1.9.2-p290 :004 > %w{b k o n s u m t m t y m a i a i o y m n i}.class
=> Array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment