lengthIsExact
Short summary
This assertion method checks if the current string stringToCheck length is equal to expectedLength.
Processed strings must be in Windows-1252 or Windows-1251 encoding
Attention: All strings are handled as null-terminated byte streams
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | POINTER TO BYTE | current string to check | input |
| expectedLength | UDINT | expected length of stringToCheck | input |
| message | AssertMessage | message if the assertion is false | input |
Code
Declaration
METHOD lengthIsExact
VAR_INPUT
(* current string to check *)
stringToCheck :POINTER TO BYTE;
(* expected length of ``stringToCheck`` *)
expectedLength :UDINT;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR