Saturday, February 3rd, 2007 •
Related •
Filed Under
To follow up my parseUri() function, here are several more UDFs I've written recently to help with URI management: getPageUri() Returns a struct containing the relative and absolute URIs of the current page. The difference between getPageUri().relative and CGI.SCRIPT_NAME is that the former will include the query string, if present. matchUri(testUri, [masterUri]) Returns a Boolean […]
Read More
Thursday, February 1st, 2007 •
Related •
Filed Under
Update: I've added a JavaScript implementation of the following UDF. See parseUri: Split URLs in JavaScript. Here's a UDF I wrote recently which allows me to show off my regex skillz. parseUri() splits any well-formed URI into its components (all are optional). The core code is already very brief, but I could replace everything within […]
Read More
Thursday, February 1st, 2007 •
Related •
Filed Under
Following are some UDFs I wrote recently to make using regexes in ColdFusion a bit easier. The biggest deal here is my reMatch() function. reMatch(), in its most basic usage, is similar to JavaScript's String.prototype.match() method. Compare getting the first number in a string using reMatch() vs. built-in ColdFusion functions: reMatch: <cfset num = reMatch("\d+", […]
Read More
Tuesday, March 28th, 2006 •
Related •
Filed Under
Apparently I had two minutes to waste writing a super-simple 1337 translator in ColdFusion. I figured I might as well pass it on… See it in action and get the source code.
Read More