BytesToString
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DEFunction Syntax
Description
Converts a byte array to a formatted string. For each byte in the input, the format is applied and the result is written to the output. Between the written bytes, the separator string is inserted. It is not inserted before the first byte or after the last byte.Parameters
- input: The byte array to be written to the output.
- format: The format in which to write the bytes to the output. It can be an arbitrary
printfformat string so long as only a single parameter is written (i.e. only a single % is present in the string). - sep: A separator string that is written in between the formatted bytes.
- output: The string in which the formatted input is written. If it is not sufficiently long to hold the output, the string will be empty and the intrinsic will return -1.
- outputStartIndex: The index in the output at which the start writing the formatted byte array. Any characters before that index are left unchanged.
Return Values
- >=0: Indicates a successful function execution and is the number of characters written into the output (without the trailing null byte).
- -1: The output was not large enough to hold the result.
- -2: The format string was malformed.