Checks if the input string contains prefixes from white list

@param tpl
string to check
@return
546826
private boolean containsAllowedPrefix(String tpl)
	{
		if (whitePrefixList.isEmpty())
			return true;

		for (String i : whitePrefixList) {
			if (tpl.startsWith(i))
				return true;
		}
		return false;
	}
853776
@Override
	public boolean containsValidPrefix(final String key) {
		if (key != null) {
			lock.readLock().lock();
			try {
				for (final String aPrefix : prefixes) {
					if (key.equals(aPrefix) || key.startsWith(aPrefix + getPrefixDelimiter())) {
						return true;
					}
				}
			} finally {
				lock.readLock().unlock();
			}
		}
		return false;
	}
136724
public boolean containsAll(Param<?>... ps) {
      List<Param<?>> paramsToCheck = Arrays.asList(ps);
      List<Param<?>> paramsCurrent = Arrays.asList(params);
      return paramsCurrent.containsAll(paramsToCheck);
   }
638282
public static <T extends Tree> Matcher<T> packageStartsWith(String prefix) {
    return (tree, state) -> getPackageFullName(state).startsWith(prefix);
  }
1230295
public boolean prefixMatchLists( String[] prefixes, String[] keys )
    {
        // The prefixes are part of the server resources. If none is given,
        // everything matches
        if ( prefixes == null )
        {
            return true;
        }
        // If no os keyes was given, and the server resource is keyed of this,
        // then return false.
        if ( keys == null )
        {
            return false;
        }
        // Check for a match on a key
        for ( String key : keys )
        {
            if ( prefixMatchStringList( prefixes, key ) )
            {
                return true;
            }
        }
        return false;
    }
629630
@Override
	public boolean containsPrefixBlock(int prefixLength) {
		checkSubnet(this, prefixLength);
		int divisionCount = getDivisionCount();
		int prevBitCount = 0;
		for(int i = 0; i < divisionCount; i++) {
			AddressDivision division = getDivision(i);
			int bitCount = division.getBitCount();
			int totalBitCount = bitCount + prevBitCount;
			if(prefixLength < totalBitCount) {
				int divPrefixLen = Math.max(0, prefixLength - prevBitCount);
				if(!division.isPrefixBlock(division.getDivisionValue(), division.getUpperDivisionValue(), divPrefixLen)) {
					return false;
				}
				for(++i; i < divisionCount; i++) {
					division = getDivision(i);
					if(!division.isFullRange()) {
						return false;
					}
				}
				return true;
			}
			prevBitCount = totalBitCount;
		}
		return true;
	}
1228041
function (tmpl) {
        var rexExp =  /\{(.*?)\}/g,
            matches = templatesCache[tmpl],
            len,
            i;
        if (!matches) {
            matches = tmpl.match(rexExp);
            len = matches.length;
            for (i = 0; i < len; i += 1) {
                matches[i] = matches[i].substr(1, matches[i].length - 2);
            }
            templatesCache[tmpl] = matches;
        }
        return matches;
    }
449279
public boolean inList(String path) {
    if (Strings.isNullOrEmpty(path)) {
      return false;
    }

    for (String prefix : mInnerList) {
      if (path.startsWith(prefix)) {
        return true;
      }
    }

    return false;
  }
877668
public static boolean containsWhitespace(final CharSequence seq) {
        if (isEmpty(seq)) {
            return false;
        }
        final int strLen = seq.length();
        for (int i = 0; i < strLen; i++) {
            if (CharUtils.isWhitespace(seq.charAt(i))) {
                return true;
            }
        }
        return false;
    }
1175204
function parseList(list, whitelist, context) {
    const parsed = list.split(',');
    parsed.forEach(item => checkWhitelist(item, whitelist, context));
    return parsed;
}
775156
private StringBuffer toQueryPrefixNoSelect(String t) {

        StringBuffer sb = new StringBuffer(255);

        return sb.append(t).append(whereTrue);
    }
567995
def url_is(white_list):
    
    def func(url):
        prefixes = white_list.get('PREFIXES', ())
        for prefix in prefixes:
            if url.startswith(prefix):
                return True
        constants = white_list.get('CONSTANTS', ())
        for exact_url in constants:
            if url == exact_url:
                return True
        return False
    return func
59913
public ValidationMatcherLibrary getLibraryForPrefix(String validationMatcherPrefix) {
        if (validationMatcherLibraries != null) {
            for (ValidationMatcherLibrary validationMatcherLibrary : validationMatcherLibraries) {
                if (validationMatcherLibrary.getPrefix().equals(validationMatcherPrefix)) {
                    return validationMatcherLibrary;
                }
            }
        }

        throw new NoSuchValidationMatcherLibraryException("Can not find validationMatcher library for prefix " + validationMatcherPrefix);
    }
1146627
public static Predicate<CharSequence> contains(Pattern pattern) {
		return t -> pattern.matcher(t).find();
	}
39244
public java.util.List<PrefixList> getPrefixLists() {
        if (prefixLists == null) {
            prefixLists = new com.amazonaws.internal.SdkInternalList<PrefixList>();
        }
        return prefixLists;
    }
1297781
public static boolean isTemplate(String candidate) {

		return StringUtils.hasText(candidate) //
				? VARIABLE_REGEX.matcher(candidate).find()
				: false;
	}
802664
public boolean containsKeyPrefix(String prefix) {
        if (prefix == null) {
            throw new NullPointerException("Prefix key can not be null");
        }

        // An empty string is a prefix of everything
        if (prefix.equals("")) {
            return true;
        }

        // Find nearest node
        PatriciaNode<V> nearest = findNearestNode(prefix);

        // If no nearest node exist, there isn't any prefix match either
        if (nearest == null) {
            return false;
        }

        // The nearest is the root, so no match
        if (nearest.getKey() == null) {
            return false;
        }

        // Test prefix match
        return nearest.getKey().startsWith(prefix);
    }