标签:boolean 一个 length 字符串 元素 dex sub 返回 int
public class SubString {
    public boolean[] chkSubStr(String[] p, int n, String s) {
        boolean [] str=new boolean[n];
    for (int i = 0; i < p.length; i++) {
        int result = s.indexOf(p[i]);
        if(result!=-1){
            str[i]=true;
        }
        else{
            str[i]=false;
        }
    }
    return  str;
    }
java 判断一个数组中个元素是否为给定字符串的子串。返回一个boolean数组
标签:boolean 一个 length 字符串 元素 dex sub 返回 int
原文地址:https://blog.51cto.com/14232658/2455129