def add_string(string, base, separator):
    """Function to append a string to another string"""
    if string != '' and string not in base:
        if base != '': base = base + separator
        base += string
    return base