StringConversionConvertToFixedLength Method (String, Int32, Byte, Int32, Int32, StringConversionGetBytes) |
Convert a fixed length string to an array of bytes.
Namespace:
Demo3D.PLC
Assembly:
PLC (in PLC.dll) Version: 15.0.2.11458
Syntaxpublic static int ConvertToFixedLength(
string str,
int charCount,
byte[] bytes,
int index,
int numBytes,
StringConversionGetBytes encoding
)
Parameters
- str
- Type: SystemString
String to encode. - charCount
- Type: SystemInt32
Max characters in string to convert. - bytes
- Type: SystemByte
Bytes to encode string into. - index
- Type: SystemInt32
Index of first byte in 'bytes' to encode string. - numBytes
- Type: SystemInt32
Maximum number of bytes in 'bytes' to encode string. - encoding
- Type: Demo3D.PLCStringConversionGetBytes
String converter.
Return Value
Type:
Int32Number of bytes encoded.
See Also