Encodes a string to UTF-8 bytes.
Does not validate MQTT restrictions; use isValidMqttString first if validation is needed.
The string to encode
UTF-8 encoded bytes
Encodes a string to UTF-8 bytes.
Does not validate MQTT restrictions; use isValidMqttString first if validation is needed.