lengthIsBetween
Short summary
This assertion method checks if the current string stringToCheck length is between minLength and maxLength
Attention: All strings are handled as null-terminated byte streams
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | POINTER TO BYTE | current string to check | input |
| minLength | UDINT | lower limit of the string length | input |
| maxLength | UDINT | upper limit of the string length | input |
| stringLengthUnit | UnicodeStringLengthUnit | string length units of measurement | input |
| message | AssertMessage | message if the assertion is false | input |
Code
Declaration
METHOD lengthIsBetween
VAR_INPUT
(* current string to check *)
stringToCheck :POINTER TO BYTE;
(* lower limit of the string length *)
minLength :UDINT;
(* upper limit of the string length *)
maxLength :UDINT;
(* string length units of measurement *)
stringLengthUnit :UnicodeStringLengthUnit;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR