Removes the whitespace characters from the start or end of a string.
Informal Syntax:
Formal Syntax:
TRIM( In:=expression, T:=expression )
Parameter | Type | Description |
---|---|---|
In | ANY_STRING | The input string. |
T | ANY_INT |
The trim options: 1 = Remove whitespace from the start of the string. 2 = Remove whitespace from the end of the string. 3 = Remove whitespace from the both the start and end of the string. |
The function is overloaded and accepts either the STRING or WSTRING type for the In parameter.
The return value is the In string with the whitespace characters removed.
Whitespace characters between words or characters are not removed.
The type of the string returned is the same as the In parameter.
Example | Return Value |
---|---|
TRIM('', 3) | STRING#'' |
TRIM(' Internet of Things ', 1) | STRING#'Internet of Things ' |
TRIM(' Internet of Things ', 2) | STRING#' Internet of Things' |
TRIM(' Internet of Things ', 3) | STRING#'Internet of Things' |
TRIM(In:=" IoT ", T:=3) | WSTRING#"IoT" |
The function TRIM is an extension to the IEC 61131-3 standard.
To learn about other String Functions.
To learn about other IEC 61131-3 Common Elements.
For the meaning of terms used in Fernhill SCADA.