2 subtext, 3 trim, Subtext – Metrohm tiBase 1.1 User Manual

Page 71: Trim

Advertising
background image

■■■■■■■■■■■■■■■■■■■■■■

2 General program functions

tiBase 1.1

■■■■■■■■

63

2.4.4.8.2

SubText

Dialog window: Formula editor

Operators/Functions

Syntax
y = SubText(Text ; Position ; Length)

Gives that part of the text from Text which begins at the index Position
and which has the length Length.

Parameters
Text

The parameter can be indicated either directly as text or as a variable of
the type Text. If the parameter does not correspond to the expected
type, it will automatically be converted to this. If this type conversion is
not possible, the result of this operation is given as invalid.

Position

The numbering of the Position begins at 1. The parameter can be indica-
ted either directly as a number or as a variable of the type Number. If
the parameter does not correspond to the expected type, it will automati-
cally be converted to this. If a type conversion is not possible or the posi-
tion does not exist, the result of this operation is given as invalid.

Length

The parameter can be indicated either directly as a number or as a variable
of the type Number. If the parameter does not correspond to the expec-
ted type, it will automatically be converted to this. It a type conversion is
not possible or the length indicated here is greater than the length of the
subtext, invalid is given

Examples
SubText("Citric acid";9;5) = acid

SubText("Citric acid";9;6) = invalid, only five characters exist from
position 9 onwards

SubText('MV.ID2';1;3) = the first three chracters of the identification 2

2.4.4.8.3

Trim

Dialog window: Formula editor

Operators/Functions

Syntax
y = Trim(Text)

Gives the Text without spaces before and after.

y = Trim(Text ; sample text)

Gives the Text without Sample text.

Advertising