是否包含某个特征

//是否包含某个特征
function includeFutrue(s1,s2) {
    let n1=0;
    let n2=0;
    while (n1<s1.length&&n2<s2.length){
        if(s1[n1]===s2[n2]){
            n1++;
            n2++;
        }else{
            n1++
        }
    }
    return n2===s2.length;
}
原文地址:https://www.cnblogs.com/caoke/p/12810279.html