摘要: public static void main(String[] args) throws IOException { String a = "a-b-c-d"; //截取最后一个‘-’前面的所有内容 String str1 = a.substring(0,a.lastIndexOf("-")); 阅读全文
posted @ 2021-04-29 19:17 凉了记忆 阅读(468) 评论(0) 推荐(0) 编辑