Click or drag to resize

StringConversionConvertFromNullTerminated Method (Byte, Int32, Int32, StringConversionGetString)

Convert an array of bytes encoding a nul terminated string, starting at byte 'offset'. Only works with 1 byte character encoded strings (eg ASCII).

Namespace:  Demo3D.PLC
Assembly:  PLC (in PLC.dll) Version: 15.0.2.11458
Syntax
C#
public static string ConvertFromNullTerminated(
	byte[] bytes,
	int offset,
	int maxOffset,
	StringConversionGetString encoding
)

Parameters

bytes
Type: SystemByte
Array of bytes to decode.
offset
Type: SystemInt32
Offset of first character in byte array.
maxOffset
Type: SystemInt32
Offset of next byte after last possible character in byte array.
encoding
Type: Demo3D.PLCStringConversionGetString
String converter.

Return Value

Type: String
String representation.
See Also