Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Need to Insert linebreak after 64 letters in a long string.

$
0
0

Hi Friends,

 

I am knew to CF - 11..I am trying to insert line break after 64 letters and dont know how to change below line. Kindly help. and also if possible please explain below line.

<cfset outstr &= Mid(instr,p,64) & #Chr(13)#>

 

 

Thanks

 

My code as follows.

 

<cfset instr = rereplace(arguments.value,"#chr(10)#","","all")>

    <cfset instr = rereplace(instr,"#chr(13)#","","all")>

  <cfset instr =trim(instr)>

<cfloop from="1" to="#len(instr)#" index="p" step="64">

<cfset outstr &= Mid(instr,p,64) & #Chr(13)#>

</cfloop>

 

currently I an getting a long string with a space after 64 letters as output.


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>