mqtt/pdu.py
def decodeString(encoded):
    '''
    Decodes an UTF-8 string from an encoded MQTT bytearray.
    Returns the decoded string and renaining bytearray to be parsed
    '''
    length = encoded[0]*256 + encoded[1]
    return (encoded[2:2+length].decode('utf-8'), encoded[2+length:])
def decodeString(encoded):
    '''
    Decodes an UTF-8 string from an encoded MQTT bytearray.
    Returns the decoded string and renaining bytearray to be parsed
    '''
    length = encoded[0]*256 + encoded[1]
    return (encoded[2:2+length].decode('utf-8'), encoded[2+length:])
def decodeString ( encoded ) : length = encoded [ 0 ] * 256 + encoded [ 1 ] return ( encoded [ 2 : 2 + length ] . decode ( 'utf-8' ) , encoded [ 2 + length : ] )
Decodes an UTF-8 string from an encoded MQTT bytearray.
    Returns the decoded string and renaining bytearray to be parsed
Decodes an UTF - 8 string from an encoded MQTT bytearray . Returns the decoded string and renaining bytearray to be parsed