Trinthlo

Converting Hex Values to Integer Values

<cffunction name="hexToInt" access="public" output="false" returntype="string">
    <cfargument name="hexValue" type="string" required="false" default="" />
    <cfset var results = "" />
    <cfset var int = createObject("java", "java.lang.Integer") />
    <cftry>
        <cfset results = int.valueOf(arguments.hexValue, 16).intValue() />
        <cfcatch></cfcatch>
    </cftry>
    <cfreturn results />
</cffunction>