def ends(self, s):
        """ends(s) is TRUE <=> k0,...k ends with the string s."""
        length = len(s)
        if s[length - 1] != self.b[self.k]:  # tiny speed-up
            return 0
        if length > (self.k0 + 1 - self.k):
            return 0
        if self.b[self.k - length + 1:self.k + 1] != s:
            return 0
        self.j = self.k - length
        return 1
dataset/ETHPy150Open CGATOxford/cgat/scripts/revigo.py/PorterStemmer.ends/swapped operands of `-`