ns=2;s=DEPRAG Smart/Utilities/StringOperations/Trim
Removes all white space characters at the beginning and end of the specified text.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bStringTrim : BOOL;
OutputDataStringTrim : ST_StringOutputData;
hrStringTrim : HRESULT;
fbStringOperations : FB_StringOperations;
END_VAR
hrStringTrim := fbStringOperations.StringTrim(
bExecute := bStringTrim,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
Value := ' Ich bin ein String',
ValueLength := SIZEOF(' Ich bin ein String'),
OutputData => OutputDataStringTrim);
IF hrStringTrim <> S_FALSE THEN
bStringTrim := 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".