def convert_string(x):
    """
    Convert the string to lower case and strip all non [z-z0-9-_] characters
    :param str x: the string to convert
    :return: the converted string
    :rtype: str
    """
    # we define the things to keep this way, just for clarity and in case we want to add other things.
    wanted = set()
    # lower case letters
    wanted.update(set(range(97, 123)))
    # numbers
    wanted.update(set(range(48, 58)))
    # - and _
    wanted.update({45, 95})
    # space
    wanted.add(32)

    s = ''
    for c in x:
        if ord(c) in wanted:
            s += c
        elif 65 <= ord(c) <= 90:
            s += chr(ord(c) + 32)
    return s