Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.Html;

public class Main {
    public static CharSequence getTextFromHtml(String content) {
        CharSequence text = "";
        if (isNotEmpty(content)) {
            text = Html.fromHtml(content);
        }
        return text;
    }

    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

    public static boolean isEmpty(String str) {
        return str == null || str.trim().length() == 0 || str.trim().equals("null");
    }
}