How can I write a newline in a string in ColdFusion?

前端 未结 7 943
孤街浪徒
孤街浪徒 2021-02-03 20:58

Currently I\'m putting newlines in strings through one of these two methods:



        
7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-03 21:37

    Your way is correct. There is no support for \n or \r in CF. From the Live Docs

    • Chr(10) returns a linefeed character
    • Chr(13) returns a carriage return character
    • The two-character string Chr(13) & Chr(10) returns a Windows newline

提交回复
热议问题