处理字符串更快

时间:2013-12-21 19:32:30

标签: string optimization coldfusion

基于Why is my coldfusion code 100x faster now on string processing?

我想知道这是否

<CFSET LocalTextString = LocalTextString & DriverID & TabChar & LocalSSN & TabChar & FirstName & CarriageReturn & LineFeed>

<CFSET TextString = TextString & LocalTextString>

相当于

<cfset Textstring &= LocalTextString & DriverID & TabChar & LocalSSN & TabChar & FirstName & CarriageReturn & LineFeed>

或者如果像

那样的话
<cfset Textstring &= (LocalTextString & DriverID & TabChar & LocalSSN & TabChar & FirstName & CarriageReturn & LineFeed)>

必须完成

1 个答案:

答案 0 :(得分:0)

<CFSET LocalTextString = LocalTextString & DriverID & TabChar & LocalSSN & TabChar & FirstName & CarriageReturn & LineFeed>
<CFSET TextString = TextString & LocalTextString>

相当于

<cfset Textstring &= LocalTextString & DriverID & TabChar & LocalSSN & TabChar & FirstName & CarriageReturn & LineFeed>

不需要额外的括号。