thanks
On Monday, June 6, 2016 at 7:43:28 PM UTC-4, David P. Sanders wrote:
>
> Wrapped in a function, obviously.
>
> El lunes, 6 de junio de 2016, 19:41:10 (UTC-4), David P. Sanders escribió:
>>
>>
>>
>> El lunes, 6 de junio de 2016, 18:53:46 (UTC-4), Jeffrey Sarnoff escribió:
>>>
>>> ```
>>> indexOfFirstNonmatching("abcd","abcd") == 0
>>> indexOfFirstNonmatching("abcd","abdc") == 3
>>> ```
>>> what is a fast way to do this with strings of 50-1000 characters?
>>>
>>
>> How about
>>
>> s1 = "abcd"
>> s2 = "abdc"
>>
>> for (i, (c, d)) in enumerate(zip(s1, s2))
>> c != d && return i
>> end
>>
>