[asterisk-bugs] [Asterisk 0017713]: [patch] Add FIELDNUM() function, returns position of a field in a list
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Aug 3 15:29:50 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=17713
======================================================================
Reported By: gareth
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 17713
Category: Functions/NewFeature
Reproducibility: N/A
Severity: feature
Priority: normal
Status: closed
Asterisk Version: SVN
JIRA: SWP-1947
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 276613
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2010-07-26 00:08 CDT
Last Modified: 2010-08-03 15:29 CDT
======================================================================
Summary: [patch] Add FIELDNUM() function, returns position of
a field in a list
Description:
FIELDNUM() returns the position of a field in a character delimited list,
ie:
Set(LIST=apples/oranges/bananas/grapes)
${FIELDNUM(LIST,/,oranges)} => Returns '2'
${FIELDNUM(LIST,/,bananas)} => Returns '3'
${FIELDNUM(LIST,/,chicken)} => Returns '0'
${FIELDNUM(LIST,#,bananas)} => Returns '0' (Note: wrong delimiter)
======================================================================
----------------------------------------------------------------------
(0125505) svnbot (reporter) - 2010-08-03 15:29
https://issues.asterisk.org/view.php?id=17713#c125505
----------------------------------------------------------------------
Repository: asterisk
Revision: 280810
_U trunk/
U trunk/CHANGES
U trunk/funcs/func_strings.c
------------------------------------------------------------------------
r280810 | tilghman | 2010-08-03 15:29:49 -0500 (Tue, 03 Aug 2010) | 19
lines
Merged revisions 280809 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r280809 | tilghman | 2010-08-03 15:25:10 -0500 (Tue, 03 Aug 2010) | 12
lines
Sneak FIELDNUM() into 1.8. Returns a 1-based index into a list of a
specified item.
Matches up with FIELDQTY() and CUT().
(closes issue https://issues.asterisk.org/view.php?id=17713)
Reported by: gareth
Patches:
svn-279754.diff uploaded by gareth (license 208)
Tested by: gareth, tilghman
Review: https://reviewboard.asterisk.org/r/810/
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=280810
Issue History
Date Modified Username Field Change
======================================================================
2010-08-03 15:29 svnbot Checkin
2010-08-03 15:29 svnbot Note Added: 0125505
======================================================================
More information about the asterisk-bugs
mailing list