'Replaces `suffix` of `word` with `replacement'

def _replace_suffix(self, word, suffix, replacement):

    assert word.endswith(suffix), u"Given    word    doesn't    end    with    given    suffix"
    if (suffix == u''):
        return (word + replacement)
    else:
        return (word[:(- len(suffix))] + replacement)
