So it looks like some CFSCRIPT based UDFs may be a bit more of a challenge than the simple example I provided (as we all know we can just use ReFindNoCase for that one).
Oh the fun world of CFCs ;-)
----- Original Message -----
From: Barney Boisvert
To: CF-Talk
Sent: Thursday, October 23, 2003 3:19 PM
Subject: RE: CFCs and UDFs
You can't have CFSCRIPT based functions in a CFC. They have to be tag
based. This is what you need:
<cffunction name="isAlphanumeric">
<cfargument name="str" />
<cfreturn REFind("[^a-zA-Z0-9]", arguments.str) EQ 0 />
</cffunction>
-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 3:05 PM
To: CF-Talk
Subject: Re: CFCs and UDFs
Thanks Barney...but HUH!!! ;-)
Is this what you mean (the cfscript having been the original UDF)??
<cfcomponent>
<cffunction name="IsAlphanumeric" ....>
<cfscript>
function IsAlphanumeric(str) {
if (ReFindNoCase("[^a-z0-9}", str) eq 0)
return true;
else
return false;
}
</cfscript>
<cfset MyVar = IsAlpaNumeric(argument.String)>
<cfreturn MyVar>
</cffunction>
</cfcomponent>
Thanks
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

