Android String Quote quote(String str)

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

Description

quote

Declaration

static String quote(String str) 

Method Source Code

//package com.java2s;

import java.util.ArrayList;

public class Main {
    static String quote(String str) {
        String ret = "";
        String[] elems = str.split("\n");
        ArrayList<String> filtered_elems = new ArrayList<String>();
        for (int i = 0; i < elems.length; ++i) {
            // if(elems[i])
            if (elems[i].length() > 0) {
                ret += ">" + elems[i].trim() + "\n";
            }// w  ww . ja  v  a 2s .c  o m
        }
        return ret;
    }
}

Related

  1. quote(String string)
  2. addQuotes(String s)