Ruby Alternative join and split in Ruby

huacnlee · June 29, 2012 · Last by fsword replied at July 02, 2012 · 1891 hits
class String
  alias / :split
end
>> "tic-tac-toe" / "-" 
=> ["tic", "tac", "toe"]

http://rors.org/2008/07/09/alternative-join-and-split-in-ruby

这个设计很欢乐

You need to Sign in before reply, if you don't have an account, please Sign up first.