I have two strings.

```
str_a = "the_quick_brown_fox"
str_b = "the_quick_red_fox"

```

I want to find the first index at which the two strings differ (i.e. `str_a[i] != str_b[i]`).

I know I could solve this with something like the following:

```
def diff_char_index(str_a, str_b)
  arr_a, arr_b = str_a.split(""), str_b.split("")
  return -1 unless valid_string?(str_a) && valid_string?(str_b)
  arr_a.each_index do |i|
    return i unless arr_a[i] == arr_b[i]
  end
end

def valid_string?(str)
  return false unless str.is_a?(String)
  return false unless str.size > 0
  true
end

diff_char_index(str_a, str_b) # => 10

```

Is there a better way to do this?