Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Convert to CRLF
     * @param text
     * @return
     */
    private static String convertToCrlf(String text) {
        String repCrlf = text.replaceAll("\r\n", "\n");
        String repLf = repCrlf.replaceAll("\r", "\n");
        String rep = repLf.replaceAll("\n", "\r\n");
        return rep;
    }
}