Here you can find the source of collapseLines(String message)
Parameter | Description |
---|---|
message | a parameter |
public static String collapseLines(String message)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w w w .java 2 s. c o m * Returns a string with all break lines replaced by the string "\n" * @param message * @return */ public static String collapseLines(String message) { return message.replaceAll("\n", "\\\\n"); } }