body:""" Hi, how are you? Yes, I am doing good. what about you. How are things going? Nothing interesting, as usual. """
在上面的行中,我想在groovy(body)中打印一个新行的句子,我该怎么做呢?我是新来的我试过使用B标签,但没有任何效果。
pu82cl6c1#
你做得很对...
body:"""Hi, how are you? Yes, I am doing good. what about you. How are things going? Nothing interesting, as usual."""
您还可以向系统询问正确的行分隔符,因为它在不同的操作系统上可能会发生变化。
writer << "Line 1" + System.getProperty("line.separator") + "Line 2"
1条答案
按热度按时间pu82cl6c1#
你做得很对...
您还可以向系统询问正确的行分隔符,因为它在不同的操作系统上可能会发生变化。