/** * get text of given value * * @param inputValue * @return */ public static CharSequence getText(LuaValue inputValue) { final LuaValue result = (inputValue != null && !inputValue.isnil()) ? inputValue : LuaValue.NIL; if (result instanceof UDSpannableString) { return ((UDSpannableString) result).getSpannableStringBuilder(); } else if (result instanceof UDUnicode) { return result.toString(); } else { return result.optjstring(""); } }