I have string: @address = \"10 Madison Avenue, New York, NY - (212) 538-1884\" What\'s the best way to split it like this?
@address = \"10 Madison Avenue, New York, NY - (212) 538-1884\"
10 Madison Avenu
rather:
break_at = @address.index(", ") result = "#{@address[0, break_at+1]}#{@address[break_at+1..-1]}"
#{@address[0, break_at+1]}
#{@address[break_at+1..-1]}