(s)
return s.strip()
Sanitize strings from pymqi responses
Sanitize strings from pymqi responses
Sanitize strings from pymqi responses
def sanitize_strings(s):
    """
    Sanitize strings from pymqi responses
    """
    s = to_string(s)
    found = s.find('\x00')
    if found >= 0:
        s = s[:found]
    return s.strip()
def sanitize_strings ( s ) : s = to_string ( s ) found = s . find ( '\x00' ) if found >= 0 : s = s [ : found ] return s . strip ( )