`
savefrom
  • 浏览: 41325 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

java基础

    博客分类:
  • Java
阅读更多
String strl = "12ssweeks324failed";
        int endindex1 = strl.indexOf("weeks");
        System.out.println(strl.substring(0, endindex1));
        if (endindex1 != -1) {
            System.out.println("==1");
        } else {
            System.out.println("==2");
        }
        int startindex = endindex1 + 5;
        endindex1 = strl.indexOf("failed");
        System.out.println(strl.substring(startindex, endindex1));
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics