Coldfusion: insert new line into string
Posted
by dmr
on Stack Overflow
See other posts from Stack Overflow
or by dmr
Published on 2010-05-05T15:35:33Z
Indexed on
2010/05/05
15:38 UTC
Read the original article
Hit count: 356
I would like to insert a line break into the first space between words in a string variable. Here is my code so far:
<cfset myPosition = find(" ", #myVar#)>
<cfset lineBreak = Chr(13)&Chr(10)>
<cfset myVar = insert(#lineBreak#, #myVar#, #myPosition#)>
What am I doing wrong?
© Stack Overflow or respective owner