String Substitution Variable Parameters

The following are examples of String Substitution Variable Parameters.

Parameter Description Example Value Variable Result
f Trims any spaces from the beginning and end of the variable result S=' Error Occurred ' &S|t|; 'Error Occurred'
tl Trims any spaces from the beginning of the variable result S=' Example text' &S|tl|; 'Example text'
tr Trims any spaces from the end of the variable result S='Example text ' &S|tr|; 'Example text'

l

Converts the variable result to lower case

S='Example Text'

&S|l|;

'example text'

u

Converts the variable result to upper case

S='Example Text'

&S|u|;

'EXAMPLE TEXT'

p Converts the variable result to proper case. i.e. the first letter of each word is a capital followed by lower case characters

S='EXAMPLE text'

&S|p|;

'Example Text'

P

The same as the 'p' parameter but preserves any existing capital letters

S='EXAMPLE text'

&S|P|;

'EXAMPLE text'

n-

Removes the first n characters from the variable result

S='Example text'

&S|-3|;

'mple text'

-n

Removes the last n characters from the variable result

S='Example text'

&S|-3|;

'Example t'

n+ Returns the first n characters from the variable result S='Example text' &S|4+|; 'Exam'
+n Returns the last n characters from the variable result S='Example text' &S|=4|; 'text'
's'- Removes all characters from s to the end of the variable result S='Example text' &S|'ple'-|; ' text'
-'s' Removes all characters from s to the end of the variable result S='Example text' &S|-'ple'|; 'Exam'
's'+ Returns all characters up to and including s from the beginning of the variable result S='Example text' &S|'ple'+|; 'Example'
+'s' Returns all characters from s to the end of the variable result S=Example text' &S|+'test'|; 'ple text'
s Instructs the software that the variable result should be treated as a string N=1784.23 &N|s|-4|; '178'

Related Topics