Implamented String::indexOf