[asterisk-users] Finding the position of a character in a string
Raj Mathur ( राज माथुर )
raju at linux-delhi.org
Tue Jul 24 10:04:30 CDT 2012
On Tuesday 24 Jul 2012, Ishfaq Malik wrote:
> It there a native asterisk dialplan function which will tell me the
> position of a specific character in a given string?
>
> eg if I wanted to find what position the '@' was at in ${SIPURI}
Worst case scenario: write a loop to iterate over each character and
stop at first match.
If you have ODBC installed: your SQL back-end should be able to perform
this function for you.
See if the dialplan function FIELDNUM can be used.
There must be many more ways.
Regards,
-- Raj
--
Raj Mathur || raju at kandalaya.org || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves || http://schizoid.in || D17F
More information about the asterisk-users
mailing list