[Zope] FindOneOf?
Mabe, Brad
BRADLEY.D.MABE@saic.com
Thu, 27 Jul 2000 15:44:54 -0400
ColdFusion (I know, a dirty word ;-) ) has a nifty string function called
"FindOneOf" which returns the index of the occurrence of any character in a
string.
Example:
FindOneOf("ghd", "abcdefghij", 1)
Will return a "4" because "d" is the fourth letter in the string
"abcdefghij". If no match is made, a 0 is returned. This is especially
useful when building a change password form, because I can easily check to
see that the new password contains at least one special character, upper
case character, number, etc. Is there anything similar to FindOneOf in
ZOPE? If not, does anyone have any hints on how I can go about doing this
kind of thing through dtml or python?
-=Brad=-