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
break_at = @address.index(",") + 1 result = "#{@address[0, break_at]}#{@address[break_at..-1].strip}"
#{@address[0, break_at]}
#{@address[break_at..-1].strip}