>>Without looping (I'd like one <cfif> conditional), is there any way to
determine if any element from "badtitlekeywords" is contained within
"title"?
Yes there is, use ReplaceList(), ie:
<CFIF ReplaceList(title, badtitlekeywords, " , , ") NEQ
badtitlekeywords>... then...
If one element of badtitlekeywords is found in the string, it will be
replaced by a space, then the strings are NEQ anymore.
If the list length of badtitlekeywords is unknown, generate a list of
spaces using RepeatString(), ie:
<CFIF ReplaceList(title, badtitlekeywords, RepeatString(" ",
listLen(badtitlekeywords))) NEQ badtitlekeywords>... then...
Notes 1. you need a lisdt with at least one character, because CF does
not handle empty elements in lists;
2. it might be more efficient to compare the string length rather tan
the string temselves, ie:
<CFIF len(ReplaceList(title, badtitlekeywords, RepeatString(" ",
listLen(badtitlekeywords)))) NEQ len(badtitlekeywords)>... then...
--
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307019
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4