contains
Short summary
This assertion method for UTF-16 strings checks if the current string stringToCheck contains 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
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | POINTER TO WORD | current string to check | input |
| searchString | POINTER TO WORD | string must be found in stringToCheck | input |
| ignoreCases | BOOL | TRUE means ignore cases; FALSE means cases must be equal too | input |
| message | AssertMessage | message if the assertion is false | input |
| normalizeStrings | BOOL | normalize both strings for check | input |
Code
Declaration
METHOD contains
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