Java Line Ending standardizeLineEndings(String string)

Here you can find the source of standardizeLineEndings(String string)

Description

standardize Line Endings

License

Apache License

Declaration

public static String standardizeLineEndings(String string) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String standardizeLineEndings(String string) {
        if (string == null) {
            return null;
        }//w  w  w.j  a  va  2s.com
        return string.replace("\r\n", "\n").replace("\r", "\n");
    }
}

Related

  1. standardizeLineEndings(String data)