Please: which function gives the location of a substring?

For my dialplan I cannot find the asterisk function that tells you where in a string a substring occurs. To make it even easier I have fix-length fields. But I cannot find the name of the function – that must exist, right? – to tell either the string offset or the ‘field number’ location of a substring.

For example:

foo = 123-456-789-012-013-014-015
subfoo = 789

What I’m looking for is the function that tells me that ‘789’ is the 3rd field in foo, or alternatively, starts at the 9th offset within foo. Either one.

Any help is appreciated.