return last element of the list

@param list
@param delimiter
@param ignoreEmpty
@return returns the last Element of a list
490265
public static String last(String list, String delimiter, boolean ignoreEmpty) {

	if (StringUtil.isEmpty(list)) return "";
	int len = list.length();

	char[] del;
	if (StringUtil.isEmpty(delimiter)) {
	    del = new char[] { ',' };
	}
	else del = delimiter.toCharArray();

	int index;
	int x;
	while (true) {
	    index = -1;

	    for (int i = 0; i < del.length; i++) {
		x = list.lastIndexOf(del[i]);
		if (x > index) index = x;
	    }

	    if (index == -1) {
		return list;
	    }

	    else if (index + 1 == len) {
		if (!ignoreEmpty) return "";
		list = list.substring(0, len - 1);
		len--;
	    }
	    else {
		return list.substring(index + 1);
	    }
	}
    }
893245
public static String trim(String list, String delimiter) {
	return trim(list, delimiter, new int[2], false);
    }
436739
def last(allow_improper = false)
      if allow_improper and improper?
        list = self
        list = list.tail while list.tail.kind_of?(Erlang::List)
        return list.tail
      else
        raise Erlang::ImproperListError if improper?
        list = self
        list = list.tail until list.tail.empty?
        return list.head
      end
    end
931009
public static <E> int lastIndexOf(final List<E> list, final E value) {
        return list.lastIndexOf(value);
    }
1116005
public static String arrayToListTrim(String[] array, String delimiter) {
	return trim(arrayToList(array, delimiter), delimiter, false);
    }
1137115
public static String join(String _delimiter, List<String> _strings) {
        if (_strings == null) {
            return null;
        }
        if (_delimiter == null) {
            _delimiter = "";
        }
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < _strings.size(); i++) {
            sb.append(_strings.get(i));
            if (i < _strings.size() - 1) { // only append delimiter if this is not the last token
                sb.append(_delimiter);
            }
        }
        return sb.toString();
    }
282032
public static String join(final StringBuffer buff, final Object array[],
            final String delim)
   {
      boolean haveDelim = (delim != null);

      for (int i = 0; i < array.length; i++)
      {
         buff.append(array[i]);

         // if this is the last element then don't append delim
         if (haveDelim && (i + 1) < array.length)
         {
            buff.append(delim);
         }
      }

      return buff.toString();
   }
906935
public int lastIndexOf(java.util.List<Character> list) {
        return lastIndexOf((CharSequence) FastStr.of(list));
    }
955236
public static List<String> splitAsList(String text, String delimiter) {
        List<String> answer = new ArrayList<String>();
        if (text != null && text.length() > 0) {
            answer.addAll(Arrays.asList(text.split(delimiter)));
        }
        return answer;
    }
811476
public static String toDelimitedString(Collection<?> list, String delim) {
        if (list == null || list.isEmpty()) {
            return EMPTY;
        }
        StringBuilder sb = new StringBuilder();
        boolean first = true;
        for (Object o : list) {
            if (!first) {
                sb.append(delim);
            }
            sb.append(o);
            first = false;
        }
        return sb.toString();
    }
1047180
@Deprecated
    public static String last(String list, String delimiter) {
	return last(list, delimiter, true);
    }
1305313
public static final int lengthOf(WsByteBuffer[] list) {
        if (null == list) {
            return 0;
        }
        int length = 0;
        for (int i = 0; i < list.length && null != list[i]; i++) {
            length += list[i].remaining();
        }
        return length;
    }
350987
public static String joiningWithDelimiter(CharSequence delimiter,
            List<String> stringList) {
        return joiningWith(stringList.stream(), delimiter);
    }
1178772
public static int lastIndexOf(final String input, final char delim) {
        return input == null ? -1 : lastIndexOf(input, delim, input.length());
    }
1264013
public static List<String> splitTrim(String str, char separator, boolean ignoreEmpty){
		return split(str, separator, 0, true, ignoreEmpty);
	}
498277
public static boolean isListElementsEmpty(final List<String> l) {
        for (final String s : l) {
            if (s != null && s.trim().length() > 0) {
                return false;
            }
        }
        return true;
    }
899697
@Deprecated
    public static String first(String list, String delimiter) {
	return first(list, delimiter, true, 1);
    }