字符串拼接,并删除最后一位
StringBuffer sb = new StringBuffer();
if (!TextUtils.isEmpty(sb)) {
documentsIds = sb.toString();
//删除拼接的字符串的最后一个字符
if (documentsIds.endsWith("^")) {
documentsIds = documentsIds.substring(0, documentsIds.length() - 1);
}
}