string-functions strpos(ition)


  • strpos(source, key)


The strpos(source, key) function results in the character offset (position) of the first occurrence of the key argument value in the source argument, starting from the begin of the string value.

If no key value occurs as a substring in the source argument, the resulting value is null.

The strpos function is case sensitive.


The domain-unit of both arguments must match or be void (literals or parameters can be combined with data items of any domain unit).


attribute<uint32> strposA (ADomain) := strpos(A, 't');
A strposA
‘Test’ 3
‘88hallo99’ null
’+)’ null
‘twee woorden’ 0
’ test met spatie’ 1

ADomain, nr of rows = 5

see also