def mismatch_in_text(self, currentPos: int) -> int:
        """
        find the index of mis-matched character in text when compared with pattern
        from last

        Parameters :
            currentPos (int): current index position of text

        Returns :
            i (int): index of mismatched char from last in text
            -1 (int): if there is no mismatch between pattern and text block
        """

        for i in range(self.patLen - 1, -1, -1):
            if self.pattern[i] != self.text[currentPos + i]:
                return currentPos + i
        return -1