Skip to main content

lengthIsMin

Short summary

This assertion method checks if the current string stringToCheck length is equal or greater than to minLength. Processed strings must be in UTF-8 encoding

Parameters

NameTypeCommentKind
stringToCheckTc2_System.T_MaxStringcurrent string to checkinput
minLengthUSINTlower limit of the length of stringToCheckinput
stringLengthUnitUnicodeStringLengthUnitstring length units of measurementinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

METHOD lengthIsMin
VAR_INPUT
(* current string to check *)
{attribute 'TcEncoding' := 'UTF-8'}
stringToCheck :Tc2_System.T_MaxString;
(* lower limit of the length of ``stringToCheck`` *)
minLength :USINT;
(* string length units of measurement *)
stringLengthUnit :UnicodeStringLengthUnit;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR

Implementation

THIS^.assertion.lengthIsMin(
stringToCheck := ADR(stringToCheck),
minLength := minLength,
stringLengthUnit := stringLengthUnit,
message := message
);