contains
Short summary
This assertion method checks if the string stringToCheck contains the search string searchString.
Processed strings must be in UTF-8 encoding
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | Tc2_System.T_MaxString | current string to check | input |
| searchString | Tc2_System.T_MaxString | string must be found in stringToCheck | input |
| message | AssertMessage | message if the assertion is false | input |
| ignoreCases | BOOL | TRUE means ignore cases; FALSE means that cases must be equal too | input |
| normalizeStrings | BOOL | normalize both strings for check | input |
Code
Declaration
METHOD contains
VAR_INPUT
(* current string to check *)
{attribute 'TcEncoding' := 'UTF-8'}
stringToCheck :Tc2_System.T_MaxString;
(* string must be found in ``stringToCheck`` *)
{attribute 'TcEncoding' := 'UTF-8'}
searchString :Tc2_System.T_MaxString;
(* message if the assertion is false *)
message :AssertMessage;
(* ``TRUE`` means ignore cases; ``FALSE`` means that cases must be equal too *)
ignoreCases :BOOL := FALSE;
(*normalize both strings for check*)
normalizeStrings :BOOL := TRUE;
END_VAR