截取最后字符串

    xiaoxiao2022-06-27  156

    public static void main(String[] args) {

    String str = "2019.05.14.测试.doc";

    System.out.println(str.substring(0,str.lastIndexOf(".")));

    }


    最新回复(0)