Code example for SpannableStringBuilder

Methods: append

0
            text.append("\n\n");
        } 
    } 
 
    private static void handleBr(SpannableStringBuilder text) {
        text.append("\n");
    } 
 
    public static <T> T getLast(Spanned text, Class<T> kind) {
        /* This knows that the last returned object from getSpans() will be the 
         * most recently added. */ 
        T[] objs = text.getSpans(0, text.length(), kind);
 
        if (objs.length == 0) {
            return null; 
        } else { 
            return objs[objs.length - 1];
        } 
    } 
 
    public static void start(SpannableStringBuilder text, Object mark) {