[WebDNA] suggestion: listwords return xth word
This WebDNA talk-list message is from 2017
It keeps the original formatting.
numero = 113425
interpreted = N
texte = 1019Currently, to parse a complex incoming variable (_ID:2:firstname) you =have to jump thru this hoop[listwords delimiters=3D:&words=3D[name]][showif =[index]=3D2][word][/showif][/listwords]It would be great if listwords could be told just to kick out one word, =i.e.[listwords delimiters=3D:&words=3D[name]&index=3D2][word][/listwords]my function solution is:[function name=3Dgetword]-- incoming variables are $string,$D (delimiter),$P (position) --[return][listwords delimiters=3D[$D]&words=3D[$string]][showif =[index]=3D[$P]][word][/showif][/listwords][/return][/function]which is even shorter to use:[getword $D=3D:&$P=3D2&$string=3D[name]]=---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list
.To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Associated Messages, from the most recent to the oldest:
1019Currently, to parse a complex incoming variable (_ID:2:firstname) you =have to jump thru this hoop[listwords delimiters=3D:&words=3D[name]][showif =[index]=3D2][word][/showif][/listwords]It would be great if listwords could be told just to kick out one word, =i.e.[listwords delimiters=3D:&words=3D[name]&index=3D2][word][/listwords]my function solution is:[function name=3Dgetword]-- incoming variables are $string,$D (delimiter),$P (position) --[return][listwords delimiters=3D[$D]&words=3D[$string]][showif =[index]=3D[$P]][word][/showif][/listwords][/return][/function]which is even shorter to use:[getword $D=3D:&$P=3D2&$string=3D[name]]=---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Brian Burton
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Creditcard verification with WebCat (1998)
A better WebCat whois (was [OT] Domain Name Scam) (2000)
FEW QUESTIONS (1997)
[append] and SSL (1997)
Referrer (2000)
Security (1999)
One more try (1997)
Help!!!! Purchases not going through! FIXED! (1997)
Am I going senile? (Price recalc based on quantity) (1997)
Forbidden CGI Error (1997)
WebCatalog2 Feature Feedback (1996)
Banners (1997)
Migrating to NT (1997)
[WebDNA] WebDNA used in US Government work? (2013)
showif field is number (1997)
Ignoring [OrderFile] context (2005)
WC 2.0 frames feature (1997)
UPDATE PROBLEM (1997)
emailer settings and control questions (1997)
The IBC root beer has arrived! (1997)