def xstrip(filename):
    while xisabs(filename):
        # strip windows drive with all slashes
        if re.match(b'\\w:[\\\\/]', filename):
            filename = re.sub(b'^\\w+:[\\\\/]+', b'', filename)
        # strip all slashes
        elif re.match(b'[\\\\/]', filename):
            filename = re.sub(b'^[\\\\/]+', b'', filename)
    return filename


# -----------------------------------------------
# Main API functions
Make relative path out of absolute by stripping
dataset/ETHPy150Open ensime/ensime-sublime/patch.py/xstrip