Compare arrays of characters in x86 assembly
===

I'm trying to compare 2 strings to see if they're equal in assembly. Case sensitive. They're passed in from a cpp wrapper. Here is what I have so far:

I stored one string in esi, the other in edi:

    LOOP:
        mov al, [esi + edx*4]
        mov bl, [edi + edx*4]
        sub al, bl
        INC edx
        je LOOP
        jmp END_LOOP  ; if it's not equal, do some stuff at the end

    END_LOOP:

What am I doing wrong? How does it know when I'm at the end of a char array?