src/org/nutz/lang/Strings.java
public static String removeLast(CharSequence str) {
        if (str == null)
            return null;
        if (str.length() > 1)
            return str.subSequence(0, str.length() - 1).toString();
        return "";
    }
public static String removeLast(CharSequence str) {
        if (str == null)
            return null;
        if (str.length() > 1)
            return str.subSequence(0, str.length() - 1).toString();
        return "";
    }
public static String removeLast ( CharSequence str ) { if ( str == null ) return null ; if ( str . length ( ) > 1 ) return str . subSequence ( 0 , str . length ( ) - 1 ) . toString ( ) ; return "" ; }
截去最后一个字符
<p>
比如:
<ul>
<li>removeLast("12345") => 1234
<li>removeLast("A") => ""
</ul>

@param str
字符串
@return 新字符串
截去最后一个字符 <p > 比如 : <ul > <li > removeLast ( 12345 ) = > 1234 <li > removeLast ( A ) = > < / ul >