Skip to main content

containsNo

Short summary

This assertion method for UTF-16 strings checks if the current string stringToCheck contains not the search string searchString

Attention: All strings are handled as null terminated word streams. For UTF-16 is end of the string 16#00_00

Parameters

NameTypeCommentKind
stringToCheckPOINTER TO WORDcurrent string to checkinput
searchStringPOINTER TO WORDstring must be found in stringToCheckinput
ignoreCasesBOOLTRUE means ignore cases; FALSE means cases must be equal tooinput
messageAssertMessagemessage if the assertion is falseinput
normalizeStringsBOOLnormalize both strings for checkinput

Code

Declaration

METHOD containsNo
VAR_INPUT
(* current string to check *)
stringToCheck :POINTER TO WORD;
(* string must be found in ``stringToCheck`` *)
searchString :POINTER TO WORD;
(* ``TRUE`` means ignore cases; ``FALSE`` means cases must be equal too *)
ignoreCases :BOOL;
(* message if the assertion is false *)
message :AssertMessage;
(*normalize both strings for check*)
normalizeStrings :BOOL := TRUE;
END_VAR