def split(text, sep=' ', glue="'", removeEmpty=False):
    """
    split - a variant of split with glue characters
    """
    res = []
    word = ''
    dontsplit = False
    lookahead = len(sep)
    for j in range(0, len(text)):
        c = text[j]
        ca = text[j:j + lookahead]
        if c in glue:
            dontsplit = not dontsplit
        if ca == sep and not dontsplit:
            res.append(word)
            word = ''
        else:
            word += c
    if not removeEmpty or len(word.strip()) > 0:
        res.append(word)
    return res
