StringConversionConvertFromMaxLengthEncoded Method (DataArrayByte, Int32, Int32, Int32, Boolean) |
Convert an array of bytes, where the first 'lengthSize' bytes contain the maximum length of the string,
and the next 'lengthSize' bytes contain the actual string length.
Namespace:
Demo3D.PLC
Assembly:
PLC (in PLC.dll) Version: 15.0.2.11458
Syntaxpublic static string ConvertFromMaxLengthEncoded(
DataArray<byte> bytes,
int index,
int numBytes,
int lengthSize,
bool bigEndian
)
Parameters
- bytes
- Type: Demo3D.PLC.CommsDataArrayByte
Array of bytes to decode. - index
- Type: SystemInt32
Index of first encoded byte in array (first 'length' byte). - numBytes
- Type: SystemInt32
Maximum number of bytes to decode. - lengthSize
- Type: SystemInt32
Number of bytes at the start that denote the length of the string. - bigEndian
- Type: SystemBoolean
Encoding for 'length'.
Return Value
Type:
StringString representation.
See Also