Created
May 20, 2011 19:53
-
-
Save davejlong/983654 to your computer and use it in GitHub Desktop.
Array Find for Pre CF9 Servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent> | |
<cfif left(Server.ColdFusion.productversion,1) LT 9> | |
<cffunction name="arrayFind" access="public" output="false" returntype="Numeric" hint="Returns the index of the first found element in the array containing the value argument"> | |
<cfargument name="array" required="true" type="array" /> | |
<cfargument name="value" required="true" type="string" /> | |
<cfreturn (Arguments.array.indexOf(Arguments.value)) +1 /> | |
</cffunction> | |
</cfif> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment