User Manual
56 General program functions
Examples
SubText("Citric acid";9;5) = acidic
SubText("Citric acid";9;6) = invalid, from the position 9 only five characters
are present
SubText('MV.ID2';1;3) = the first three characters of the identification 2
Trim
Syntax
y = Trim(Text)
Returns the
Text without any empty spaces in front of it or behind it.
y = Trim(Text ; Sample text)
Returns the
Text without Sample text.
Parameter
Text
The parameter can either be entered directly or as a Variable of the type
Text, Number or Date/Time.
Sample text
The parameter can either be entered directly or as a Variable of the type
Text, Number or Date/Time. If the types of the two parameters are not identi-
cal then the type
Sample text will always be converted to the type Text (see
Functions - Type conversion).
Note
Entries of the type
Number
are always given with one decimal place.
Example:
TextPosition("12345";3) = invalid
, as before the operation the 3 is con-
verted to 3.0 and this is not contained in the text.
Examples
Trim(" Citric acid ") = "Citric acid"
Trim("Citric acid";"acid") = lemons
Trim("Citric acid";"salt") = Citric acid