2019年10月24日

java中String中的endsWith()方法

摘要: 解释:endsWith() ——此方法测试字符串是否以指定的后缀 suffix 结束。 此方法的定义:public boolean endsWith(String suffix) 我这里判断的是路径是否是以“/”为结尾的,不是的话就添加一个“/” //判断是否为“/”结尾的字符串 private S 阅读全文
posted @ 2019-10-24 11:23 songyinan 阅读(2687) 评论(0) 推荐(0)