Java tutorial
//package com.java2s; public class Main { /** * Get New-line character remove * * @param message changed message * @return Removed New-line character */ public static String removeNewLineCharacter(String message) { return message.replace(System.getProperty("line.separator"), ""); } }