def is_binary_string(string_):
    """
    detect if string is binary (https://stackoverflow.com/a/7392391)

    :param string_: `str` to be evaluated
    :returns: `bool` of whether the string is binary
    """

    if isinstance(string_, str):
        string_ = bytes(string_, 'utf-8')

    textchars = (bytearray({7, 8, 9, 10, 12, 13, 27} |
                 set(range(0x20, 0x100)) - {0x7f}))
    return bool(string_.translate(None, textchars))