<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Jon Hartmann - Utility Function</title>
			<link>http://www.jonhartmann.com/index.cfm</link>
			<description>Technical blog of West Virginia web developer Jon Hartmann, covering ColdFusion, Asp.NET, Javascript, User Interface Design, and current website trends.</description>
			<language>en-us</language>
			<pubDate>Sun, 05 Sep 2010 12:52:53 -0500</pubDate>
			<lastBuildDate>Wed, 24 Mar 2010 22:16:00 -0500</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>jon.hartmann@gmail.com</managingEditor>
			<webMaster>jon.hartmann@gmail.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>jon.hartmann@gmail.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>Jon Hartmann</title>
				<link>http://www.jonhartmann.com/index.cfm</link>
			</image>
			<itunes:explicit></itunes:explicit>
			
			<item>
				<title>Utility Functions: Geometry Functions</title>
				<link>http://www.jonhartmann.com/index.cfm/2010/3/24/Utility-Functions-Geometry-Functions</link>
				<description>
				
				Today we&apos;ve got a double header of functions dealing with Geometry. As I said in my last post, I&apos;ve been spurred into action by a user&apos;s question, and in order to solve his problem, I&apos;m going to need to be able to calculate some relatively simple geometry. Click &quot;more&quot; to see how to convert Degrees to Radians and how to calculate the position of a point based on a starting location, angle, and distance.  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 24 Mar 2010 22:16:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2010/3/24/Utility-Functions-Geometry-Functions</guid>
				
			</item>
			
			<item>
				<title>Utility Function: RoundToClosest()</title>
				<link>http://www.jonhartmann.com/index.cfm/2010/3/22/Utility-Function-RoundToClosest</link>
				<description>
				
				Its been a while! I got an email from a reader who wanted some help with a bit of image manipulation that has roused me back into CF coding! The particular bit of functionality he wants is rather complex, and so its been forcing me to make a bunch of utility functions to piece it together. First thing I ran into: rounding a number in CF is a little tricky. If you want to round to 2 decimal places, you should multiply the number by 100, call Round() and then divide by 100 again. What a waste. Luckily a little trickery with NumberFormat() can get us what we want.  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Mon, 22 Mar 2010 22:04:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2010/3/22/Utility-Function-RoundToClosest</guid>
				
			</item>
			
			<item>
				<title>Utility Functions: REExtractAll() and REExtractAllNoCase()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/9/25/Utility-Functions-REExtractAll-and-REExtractAllNoCase</link>
				<description>
				
				Since it had been so long since I released utility functions, I&apos;m doing another double header today! Not that its really that hard since these two are exactly the same... but any way, continuing where yesterday&apos;s REFindAll() and REFindAllNoCase() left off, these two new functions actually return the matching values!  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Fri, 25 Sep 2009 12:40:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/9/25/Utility-Functions-REExtractAll-and-REExtractAllNoCase</guid>
				
			</item>
			
			<item>
				<title>Utility Functions: REFindAll() and REFindAllNoCase()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/9/25/Utility-Functions-REFindAll-and-REFindAllNoCase</link>
				<description>
				
				Its been a while since I released a utility function, so today I bring you a very closely related pair that solve a very simple problem thats missing with ColdFusion&apos;s Regular Expression functions. Given a regular expression in ColdFusion, you can find out if there is a match for that regular expression in a given string, and where it is, but you can&apos;t find out the location of ALL of the values that match the regular expression.  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Fri, 25 Sep 2009 12:29:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/9/25/Utility-Functions-REFindAll-and-REFindAllNoCase</guid>
				
			</item>
			
			<item>
				<title>Using ColdFusion to Zip Individual Files</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/5/28/Using-ColdFusion-to-Zip-Individual-Files</link>
				<description>
				
				&lt;img src=&quot;http://www.jonhartmann.com/images/zip.PNG&quot; class=&quot;floatTL&quot; /&gt; I ran into an interesting situation this morning that didn&apos;t have an obvious answer. I needed to create a zip with a few specific files out of a directory with lots of possible files. The problem is that &amp;lt;cfzip /&amp;gt; is designed to work against whole directories, so at first I kept thinking that I&apos;d have to make a temporary directory, move the files to it, and then zip the directory, but a little more persistence found the right answer.  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Thu, 28 May 2009 10:43:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/5/28/Using-ColdFusion-to-Zip-Individual-Files</guid>
				
			</item>
			
			<item>
				<title>Utility Functions: ListIsValid() and ListRemoveInvalid()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/2/27/Utility-Functions-ListIsValid-and-ListRemoveInvalid</link>
				<description>
				
				&lt;img src=&quot;http://www.jonhartmann.com/images/gear.PNG&quot; class=&quot;floatTL&quot; alt=&quot;A gear&quot; /&gt; One technique I often use is to create gateway objects to my database that allow the user to pass in multiple IDs, rather then a single one. I&apos;ve run into a problem though; what if the user passes through something that is a valid list, but is not a valid list of the type I need? Read more to see ListIsValid() abd ListRemoveInvalid().  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Fri, 27 Feb 2009 09:28:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/2/27/Utility-Functions-ListIsValid-and-ListRemoveInvalid</guid>
				
			</item>
			
			<item>
				<title>Utility Functions: CreateMapping() and RemoveMapping()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/2/26/Utility-Functions-CreateMapping-and-RemoveMapping</link>
				<description>
				
				Some more &quot;stolen&quot; code for today&apos;s pair of utility functions. Thanks to &lt;a href=&quot;http://fusiongrokker.com/post/add-mappings-via-code-in-cf7-using-java&quot;&gt;FusionGrokker&apos;s post on controlling mappings in CF7&lt;/a&gt;. As FusionGrokker points out, these functions work in CF7, but its actually hacking global mapping values, so you could have problems.


&lt;code&gt;&lt;cffunction name=&quot;CreateMapping&quot; output=&quot;false&quot; returntype=&quot;void&quot;&gt;
	&lt;cfargument name=&quot;mapping&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;path&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	
	&lt;cfset var factory = CreateObject(&quot;java&quot;, &quot;coldfusion.server.ServiceFactory&quot;) /&gt;
	&lt;cfset var mappings = factory.runtimeService.getMappings() /&gt;
	
	&lt;cfset mappings[arguments.mapping] = arguments.path /&gt;
	
	&lt;cfreturn /&gt;
&lt;/cffunction&gt; 

&lt;cffunction name=&quot;RemoveMapping&quot; output=&quot;false&quot; returntype=&quot;void&quot;&gt;
	&lt;cfargument name=&quot;mapping&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	
	&lt;cfset var factory = CreateObject(&quot;java&quot;, &quot;coldfusion.server.ServiceFactory&quot;) /&gt;
	&lt;cfset var mappings = factory.runtimeService.getMappings() /&gt;
	
	&lt;cfset StructDelete(mappings, arguments.mapping) /&gt;
	
	&lt;cfreturn /&gt;
&lt;/cffunction&gt; &lt;/code&gt; 
				</description>
				
				<category>Utility Function</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Thu, 26 Feb 2009 05:30:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/2/26/Utility-Functions-CreateMapping-and-RemoveMapping</guid>
				
			</item>
			
			<item>
				<title>Utility Function: StructDeleteKeys()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/1/19/Utility-Function-StructDeleteKeys</link>
				<description>
				
				&lt;img src=&quot;http://www.jonhartmann.com/images/gear.PNG&quot; alt=&quot;A gear&quot; class=&quot;floatTL&quot; /&gt; I often need to delete struct keys based on a list of items. Its not that I can&apos;t just loop the list and call StructDelete(), but it gets old, and this function makes it a little easier.

&lt;code&gt;&lt;cffunction name=&quot;StructDeleteKeys&quot; returntype=&quot;void&quot;&gt;
	&lt;cfargument name=&quot;struct&quot; type=&quot;struct&quot; requried=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;keyList&quot; type=&quot;string&quot; requried=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;delimiters&quot; type=&quot;string&quot; required=&quot;false&quot; default=&quot;,&quot; /&gt;
	
	&lt;cfloop list=&quot;#arguments.keyList#&quot; delimiters=&quot;#arguments.delimiters#&quot; index=&quot;key&quot;&gt;
		&lt;cfset StructDelete(arguments.struct, key) /&gt;
	&lt;/cfloop&gt;
	
	&lt;cfreturn /&gt;
&lt;/cffunction&gt;&lt;/code&gt; 
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Mon, 19 Jan 2009 10:14:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/1/19/Utility-Function-StructDeleteKeys</guid>
				
			</item>
			
			<item>
				<title>Utility Functions: StructToListPairs() and ListPairsToStruct()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/1/17/Utility-Functions-StructToListPairs-and-ListPairsToStruct</link>
				<description>
				
				Today we have a pair of functions designed to convert structures into list pairs and back again. They serve as the back bone of another pair of functions that I&apos;ll release soon. StructToListPairs() is also useful when constructing long links (such as creating &quot;sort&quot; links for tables).

&lt;code&gt;&lt;cffunction name=&quot;StructToListPairs&quot; returntype=&quot;string&quot;&gt;
	&lt;cfargument name=&quot;struct&quot; type=&quot;struct&quot; requried=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;delimiter1&quot; type=&quot;string&quot; required=&quot;false&quot; default=&quot;&amp;&quot; /&gt;
	&lt;cfargument name=&quot;delimiter2&quot; type=&quot;string&quot; required=&quot;false&quot; default=&quot;=&quot; /&gt;
	
	&lt;cfset var buffer = CreateObject(&quot;java&quot;, &quot;java.lang.StringBuffer&quot;).init() /&gt;
	
	&lt;cfloop collection=&quot;#arguments.struct#&quot; item=&quot;key&quot;&gt;
		&lt;cfset buffer.append(key) /&gt;
		&lt;cfset buffer.append(delimiter2) /&gt;
		&lt;cfset buffer.append(arguments.struct[key]) /&gt;
		&lt;cfset buffer.append(delimiter1) /&gt;
	&lt;/cfloop&gt;
	
	&lt;cfif buffer.length() gt 1&gt;
		&lt;cfset buffer.setLength(buffer.length()-1) /&gt;
	&lt;/cfif&gt;
	
	&lt;cfreturn buffer.toString() /&gt;
&lt;/cffunction&gt;

&lt;cffunction name=&quot;ListPairsToStruct&quot; returntype=&quot;struct&quot;&gt;
	&lt;cfargument name=&quot;list&quot; type=&quot;string&quot; requried=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;delimiter1&quot; type=&quot;string&quot; required=&quot;false&quot; default=&quot;&amp;&quot; /&gt;
	&lt;cfargument name=&quot;delimiter2&quot; type=&quot;string&quot; required=&quot;false&quot; default=&quot;=&quot; /&gt;
	
	&lt;cfset var returnValue = StructNew() /&gt;
	
	&lt;cfloop list=&quot;#arguments.list#&quot; index=&quot;pair&quot; delimiters=&quot;#arguments.delimiter1#&quot;&gt;
		&lt;cfset returnValue[ListFirst(pair, arguments.delimiter2)] = ListLast(pair, arguments.delimiter2) /&gt;
	&lt;/cfloop&gt;
	
	&lt;cfreturn returnValue /&gt;
&lt;/cffunction&gt;&lt;/code&gt; 
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Sat, 17 Jan 2009 05:30:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/1/17/Utility-Functions-StructToListPairs-and-ListPairsToStruct</guid>
				
			</item>
			
			<item>
				<title>Utility Functions: Three String Functions</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/1/16/Utility-Functions-StringToChars-StringBeginsWith-StringEndsWith</link>
				<description>
				
				Here is a trio of functions based on a question from Hal Helm&apos;s &lt;a href=&quot;http://halhelms.com/quiz.cfm&quot;&gt;&quot;Are you OO Ready&quot; quiz&lt;/a&gt;, in which he mentions that you can do the following:

&lt;code&gt;&lt;cfset x = &quot;something&quot; /&gt;
&lt;cfset y = x /&gt;
&lt;cfoutput&gt;#y.equals(x)#&lt;/cfoutput&gt;&lt;/code&gt;

So I came up with these:

&lt;code&gt;&lt;cffunction name=&quot;StringToChars&quot; access=&quot;public&quot; output=&quot;false&quot; returntype=&quot;array&quot;&gt;
	&lt;cfargument name=&quot;string&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	
	&lt;cfreturn arguments.string.toCharArray() /&gt;
&lt;/cffunction&gt;

&lt;cffunction name=&quot;StringEndsWith&quot; access=&quot;public&quot; output=&quot;false&quot; returntype=&quot;boolean&quot;&gt;
	&lt;cfargument name=&quot;string&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;suffix&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	
	&lt;cfreturn arguments.string.endsWith(arguments.suffix) /&gt;
&lt;/cffunction&gt;

&lt;cffunction name=&quot;StringBeginsWith&quot; access=&quot;public&quot; output=&quot;false&quot; returntype=&quot;boolean&quot;&gt;
	&lt;cfargument name=&quot;string&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;prefix&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	
	&lt;cfreturn arguments.string.startsWith(arguments.prefix) /&gt;
&lt;/cffunction&gt;&lt;/code&gt; 
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Fri, 16 Jan 2009 14:32:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/1/16/Utility-Functions-StringToChars-StringBeginsWith-StringEndsWith</guid>
				
			</item>
			
			<item>
				<title>Utility Function: PatternExtract()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/1/9/Utility-Function-PatternExtract</link>
				<description>
				
				Yet another Pattern based utility function. PatternExtract() takes a pattern and gives you make a structure with values based on the groups. Additional function arguments (beyond pattern and string) are used to determine the keys (in order) that match with the groups.

&lt;code&gt;&lt;cffunction name=&quot;PatternExtract&quot; output=&quot;false&quot; returntype=&quot;struct&quot;&gt;
	&lt;cfargument name=&quot;pattern&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;string&quot; type=&quot;string&quot; required=&quot;true&quot; /&gt;

	&lt;cfset var returnValue = StructNew() /&gt;
	&lt;cfset var array = Duplicate(arguments) /&gt;

	&lt;cfset ArrayDeleteAt(array, 1) /&gt;
	&lt;cfset ArrayDeleteAt(array, 2) /&gt;

	&lt;cfif IsSimpleValue(arguments.pattern)&gt;
		&lt;cfset arguments.pattern = CreateObject(&quot;java&quot;, &quot;java.util.regex.Pattern&quot;).compile(arguments.pattern) /&gt;
	&lt;/cfif&gt;
	
	&lt;cfset local.matcher = arguments.pattern.matcher(arguments.string)&gt;

	&lt;cfif local.matcher.matches()&gt;
		&lt;cfset local.groups = local.matcher.groupCount() /&gt;
		&lt;cfloop from=&quot;1&quot; to=&quot;#local.groups#&quot; index=&quot;x&quot;&gt;
			&lt;cfset returnValue[array[x]] = local.matcher.group(x) /&gt;
		&lt;/cfloop&gt;
	&lt;/cfif&gt;

	&lt;cfreturn returnValue /&gt;
&lt;/cffunction&gt;&lt;/code&gt;

&lt;div class=&quot;information&quot;&gt;I coded this in a hurry, so yeah its a little sloppy. I&apos;ll try and update this post with a more refined version.&lt;/div&gt; 
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Fri, 09 Jan 2009 05:30:02 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/1/9/Utility-Function-PatternExtract</guid>
				
			</item>
			
			<item>
				<title>Utility Function: QueryAddRowData()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/1/8/Utility-Function-QueryAddRowData</link>
				<description>
				
				This one probably isn&apos;t original, but I wanted to be able to add whole rows to query sets in a simple manner. The built in functions let you add new columns in a simple way, but not new rows. Thats kind of weird, since I&apos;d think that people would want to add rows more often the columns. QueryAddRowData() is designed to be flexible in its allowed inputs, working with structs, arrays, and lists.

&lt;code&gt;&lt;cffunction name=&quot;QueryAddRowData&quot; access=&quot;public&quot; output=&quot;false&quot; returntype=&quot;void&quot;&gt;
	&lt;cfargument name=&quot;query&quot; type=&quot;query&quot; required=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;data&quot; type=&quot;any&quot; required=&quot;true&quot; /&gt;
	&lt;cfargument name=&quot;delimiter&quot; type=&quot;string&quot; required=&quot;false&quot; default=&quot;,&quot; /&gt;
	
	&lt;cfset var local = StructNew() /&gt;
	
	&lt;cfif NOT (IsArray(arguments.data) OR (IsStruct(arguments.data) AND NOT isObject(arguments.data)) OR IsSimpleValue(arguments.data))&gt;
		&lt;cfthrow errorcode=&quot;QueryAddRowData&quot; message=&quot;Invalid data for argument data. Valid types are array, struct, and string.&quot; /&gt;
	&lt;/cfif&gt;
	
	&lt;cfset QueryAddRow(arguments.query) /&gt;
	
	&lt;cfif IsArray(arguments.data)&gt;
		&lt;cfset local.columns = ListToArray(arguments.query.columnList) /&gt;
		&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(local.columns)#&quot; index=&quot;x&quot;&gt;
			&lt;cfset QuerySetCell(arguments.query, local.columns[x], arguments.data[x]) /&gt;
		&lt;/cfloop&gt;	
		
	&lt;cfelseif IsStruct(arguments.data) AND NOT isObject(arguments.data)&gt;
		&lt;cfloop collection=&quot;#arguments.data#&quot; item=&quot;column&quot;&gt;
			&lt;cfset QuerySetCell(arguments.query, column, arguments.data[column]) /&gt;
		&lt;/cfloop&gt;
	&lt;cfelseif IsSimpleValue(arguments.data)&gt;
		&lt;cfset local.data = ListToArray(arguments.data, arguments.delimiter) /&gt;
		&lt;cfset local.columns = ListToArray(arguments.query.columnList) /&gt;
		&lt;cfloop from=&quot;1&quot; to=&quot;#ArrayLen(local.columns)#&quot; index=&quot;x&quot;&gt;
			&lt;cfset QuerySetCell(arguments.query, local.columns[x], local.data[x]) /&gt;
		&lt;/cfloop&gt;	
	&lt;/cfif&gt;
	
	&lt;cfreturn /&gt;
&lt;/cffunction&gt;&lt;/code&gt;

Please note that with arrays and lists, the data must be ordered as it would be in the Query.columnList (alphabetically). 
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Thu, 08 Jan 2009 05:30:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/1/8/Utility-Function-QueryAddRowData</guid>
				
			</item>
			
			<item>
				<title>Utility Function: IsTime()</title>
				<link>http://www.jonhartmann.com/index.cfm/2009/1/7/Utility-Function-IsTime</link>
				<description>
				
				My company often splits up date and time entries on forms, and then concatenates them back together on the back end. This is fine, except the time inputs are prone to errors, as IsDate() seems to be the only built in check to see if a string is a time, and it matches on things that are not purely times. To get around this, I create a new check: IsTime().  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Wed, 07 Jan 2009 05:30:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2009/1/7/Utility-Function-IsTime</guid>
				
			</item>
			
			<item>
				<title>Utility Function: Singularize()</title>
				<link>http://www.jonhartmann.com/index.cfm/2008/12/16/Utility-Function-Singularize</link>
				<description>
				
				Well, after doing pluralize(), it should be no surprise that I also wanted to do singularize(). There are actually more rules for this one, even though I tried harder to make the rules smarter, rather then more numerous. In the end, the code is identical, save for the different list of patterns to match. Again, these patterns are based on the &lt;a href=&quot;http://www.thinksharp.org/javascript-rails-like-pluralize-function/&quot;&gt;singularization regular expressions I found on ThinkSharp.org&lt;/a&gt;, although with my own modifications. Read more to see the code and the results of testing.  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Tue, 16 Dec 2008 17:19:00 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2008/12/16/Utility-Function-Singularize</guid>
				
			</item>
			
			<item>
				<title>Utility Function: Pluralize()</title>
				<link>http://www.jonhartmann.com/index.cfm/2008/12/15/Utility-Function-Pluralize</link>
				<description>
				
				So, I&apos;ve been putting up a bunch of functions to work with Java patterns, especially working with groups. Now its time to put some of them to work to make a function to handle pluralization. Pluralizing arbitrary strings is important in dynamic systems, and used heavily in some ORM schemes, so I thought I&apos;d try to make one. My first version is based on &lt;a href=&quot;http://www.thinksharp.org/javascript-rails-like-pluralize-function/&quot;&gt; pluralization regular expressions found at ThinkSharp&lt;/a&gt;, although I&apos;ve made some modifications and changes to make the substitutions more dynamic, and preventing pluralization rules from altering a word that already appears to be pluralized. Click more to check out the code and the tests.  [More]
				</description>
				
				<category>Utility Function</category>				
				
				<pubDate>Mon, 15 Dec 2008 05:29:59 -0500</pubDate>
				<guid>http://www.jonhartmann.com/index.cfm/2008/12/15/Utility-Function-Pluralize</guid>
				
			</item>
			</channel></rss>