def tag_strings_match(tag_string, mandatory_tag):
    """true if tag string matches the mandatory tag,
    the comparison is not symmetric if tag_string ends with a
    wildcard (asterisk)
    """
    if mandatory_tag.endswith('*'):
        return tag_string.startswith(mandatory_tag[:-1])
    else:
        return tag_string == mandatory_tag
