Android String End of Line Convert deleteEmptyLine(String str)

Here you can find the source of deleteEmptyLine(String str)

Description

delete Empty Line

Declaration

public static String deleteEmptyLine(String str) 

Method Source Code

//package com.java2s;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {

    public static String deleteEmptyLine(String str) {
        String dest = str;//from  w  w  w  .j a v a2 s. c  om
        if (str != null) {
            Pattern p = Pattern.compile("\r|\n");
            Matcher m = p.matcher(str);
            dest = m.replaceAll("");
        }
        return dest;
    }
}

Related

  1. removeEnd(String str, String remove)
  2. newLineToBr(String s)
  3. filterEnter(String str)
  4. fold(String recipients)
  5. findEmptyLine(String s)
  6. isS(char ch)