ColdFusion String Manipulation
I don't know if this is new to everyone, but it was to me. Jason Delmore , the Product Manager for ColdFusion informed us of something intriguing in his Developing Hybrid Applications with ColdFusion and Java and talk today. He informed us that ColdFusion strings are an extension of the Java String class. Which means that methods of Java strings are available to ColdFusion. What does this mean? It means that this is valid code:
<cfset test_1= "A string to test" />
<cfset test_2= "A string to add on to a string to test." />
<cfset test_1 = test_1.concat(test_2) />
Not only is it more elegant of other ColdFusion string concatenation techniques, it appears to run about twice as fast.
Also any other method listed in the Java String reference will work.
Comments
Let's not also forget -
Parsed Dates are java.util.Date Arrays are java.util.Vector Structs are java.util.Hashmap Query results are java.sql.ResultSet
there are lots and lots out there ;o)
I haven't compared this method to StringBuffers yet. So much to try, so little time. 



Posted by: Ben Nadel at October 25, 2006 8:13 AM