# Find the position of a single non-matching character between two strings

**URL:** <https://discourse.julialang.org/t/find-the-position-of-a-single-non-matching-character-between-two-strings/86560>\
**Category:** General Usage\
**Tags:** strings, unicode\
**Created:** [August 30, 2022, 5:07pm UTC](https://discourse.julialang.org/t/find-the-position-of-a-single-non-matching-character-between-two-strings/86560 "2022-08-30T17:07:38Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Post date:** [August 30, 2022, 6:15pm UTC](https://discourse.julialang.org/t/find-the-position-of-a-single-non-matching-character-between-two-strings/86560/8 "2022-08-30T18:15:48Z")

</div>

With @digital_carver / @DNF hints of why `zip` makes trouble… so that would work and not allocate:

```julia
findfirst( s1[i] != s2[i] for i in 1:min(length(s1),length(s2)) )

```

---

_[View the full topic](https://discourse.julialang.org/t/find-the-position-of-a-single-non-matching-character-between-two-strings/86560)._
