8 text functions, 1 textposition, Textposition – Metrohm tiamo 2.1 (ProcessLab) User Manual
Page 89
■■■■■■■■■■■■■■■■■■■■■■
2 General program functions
tiamo 2.1 (ProcessLab)
■■■■■■■■
73
2.4.4.8
Text functions
2.4.4.8.1
TextPosition
Dialog window: Formula editor
▶ Operators/Functions
Syntax
y = TextPosition(Text ; sample text)
Gives the Index which indicates at which point the sample text appears
for the first time in the Text. The numbering of the index begins at 1!
Parameters
Text
The parameter can be indicated either directly or as a variable of the type
Text, Number or Date/Time.
Sample text
The parameter can be indicated either directly or as a variable of the type
Text, Number or Date/Time. If the types of the two parameters do not
coincide, the type is converted from Sample text to the type Text. If the
Sample text is not included in the Text, the status invalid is given.
Note
Entries of the type Number are always provided with a decimal place.
Example: TexPosition("12345";3) = invalid, as the 3 is converted to
3.0 before the operation in 3.0 and this is not included in the text.
Examples
TextPosition("Citric acid";"acid") = 9, the word "acid" occurs in the text
from index number 9 onwards
TextPosition("Citric acid";"Acid") = invalid, the word "Acid" (capital-
ized) does not occur in the text
TextPosition("Citirc acid";"salt") = invalid, the word "salt" does not
occur in the text
TextPosition(Time(2004;05;05);"5") = 7
TextPosition(3362.14;"6") = 3
TextPosition('MV.ID2';"Carbonate") = Index in which the word part
"Carbonate" begins for the first time in the ID2