ColdFusion Fastest String Concatenation Using CFSAVECONTENT

There are many way to concatenation string in coldfusion but there is one easiest way for that. it can be done using CFSAVECONTENT tag. It is faster than others.

[code:cf]<cfscript>
str = "There is a content";
str = str & " for concate a string.";
writeoutput(str);
</cfscript>
<cfscript>
str = ArrayNew(1);
str[1] = "There is a content";
ArrayAppend(str," for concate a string.");
str = ArrayToList(str, "");
writeoutput(str);
</cfscript>
<cfscript>
str = "There is a content";
str = ListAppend(str," for concate a string."," ");
writeoutput(str);
</cfscript> [/code]

String concatenation using CFSAVECONTENT tag.

[code:cf]<cfsavecontent variable="str">
There is a content for concate a string.
<cfloop from="1" to="2" index="i">
String Concating…..
</cfloop>
</cfsavecontent>
<cfoutput>#str#</cfoutput>[/code]

Hope you may like this one just copy n paste in your cfm page for testing.