Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static String getConvertHtml(String content) { String rs = content; if (!TextUtils.isEmpty(content)) { rs = ""; String[] arr_contents = content.split("\r\n"); for (int i = 0, len = arr_contents.length; i < len; i++) { rs += " " + arr_contents[i] + "<br/>"; } } return rs; } }