ns=2;s=DEPRAG Smart/Utilities/StringOperations/Contains
Checks if a text occurs in another text and returns the result.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bStringContains : BOOL;
OutputDataStringContains : ST_BoolOutputData;
hrStringContains : HRESULT;
fbStringOperations : FB_StringOperations;
END_VAR
hrStringContains := fbStringOperations.StringContains(
bExecute := bStringContains,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ContainString := 'Ich bin ein String',
ContainStringLength := SIZEOF('Ich bin ein String'),
Value := 'String',
ValueLength := SIZEOF('String'),
IgnoreCase := TRUE,
OutputData => OutputDataStringContains);
IF hrStringContains <> S_FALSE THEN
bStringContains := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".