Java tutorial
//package com.java2s; public class Main { public static String normaliseEolns(String value) { return value.replace("\r\n", "\r").replace("\n", "\r").replace("\r", "\r\n"); } }