📜  java retirer derniere caractere sting - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.403000             🧑  作者: Mango

代码示例1
public static String removeLastChar(String s) {
    return (s == null || s.length() == 0)
      ? null
      : (s.substring(0, s.length() - 1));
}