欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Java中 startsWith() 方法和endsWith()方法判断字符串的前缀和后缀

程序员文章站 2022-07-16 14:16:22
...
if(gatewayType.startsWith("9885")){
            smsWoFee = querySmsWoFee(sid, cid,gatewayType,s_longno, orderDateStr, cancelDateStr, isOn);
        }else if(gatewayType.startsWith("9789")){
            smsWoFee = querySmsWoFee(sid, cid,gatewayType,s_longno, orderDateStr, cancelDateStr, isOn);
        }else{
            smsWoFee = null;
        }