bytes.to_text

bytes.to_text

bytes.to_text

Function

Convert Bytes to string strictly as UTF-8.

Syntax

Parameters

No parameters.

Return value

TypeDescription
String/NullLegal UTF-8 returns String; illegal UTF-8 returns null.

Code Example

Notes

  • to_text() will not use lossy conversion; device protocols or network messages should be observed first using to_hex(), to_array() or protocol parsing functions.