lengthIsBetween
Short summary
This assertion method checks if the current string stringToCheck length is between minLength and maxLength.
Processed strings must be in UTF-8 encoding
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | Tc2_System.T_MaxString | current string to check | input |
| minLength | USINT | lower limit of the string length | input |
| maxLength | USINT | 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 *)
{attribute 'TcEncoding' := 'UTF-8'}
stringToCheck :Tc2_System.T_MaxString;
(* lower limit of the string length *)
minLength :USINT;
(* upper limit of the string length *)
maxLength :USINT;
(* string length units of measurement *)
stringLengthUnit :UnicodeStringLengthUnit;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR