lengthIsMax
Short summary
This assertion method checks if the current string stringToCheck is length
is equal or less than to maxLength
Attention: All strings are handled as null terminated word streams. For UTF-16 is end of the string 16#00_00
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | POINTER TO WORD | current string to check | input |
| maxLength | UDINT | upper limit of the length of stringToCheck | input |
| stringLengthUnit | UnicodeStringLengthUnit | string length units of measurement | input |
| message | AssertMessage | message if the assertion is false | input |
Code
Declaration
METHOD lengthIsMax
VAR_INPUT
(* current string to check *)
stringToCheck :POINTER TO WORD;
(* upper limit of the length of ``stringToCheck`` *)
maxLength :UDINT;
(* string length units of measurement *)
stringLengthUnit :UnicodeStringLengthUnit;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR