Checks whether the substring is present within element ID
@param sub Substring to check for
@param element DOM element
@returns {*|boolean}
543985
function evaluateID(sub, element) {
  var id = element.id;

  return id && id.indexOf(sub) === 0;
}
630150
function isVoidElement(elName) {
    var result = false;
    if (elName && elName.toLowerCase) {
        result = VOID_HTML_ELEMENTS.hasOwnProperty(elName.toLowerCase());
    }
    return result;
}
1222892
static final String xpath(Element element) {
        StringBuilder sb = new StringBuilder();

        Node iterator = element;
        while (iterator.getNodeType() == Node.ELEMENT_NODE) {
            sb.insert(0, "]");
            sb.insert(0, siblingIndex((Element) iterator) + 1);
            sb.insert(0, "[");
            sb.insert(0, ((Element) iterator).getTagName());
            sb.insert(0, "/");

            iterator = iterator.getParentNode();
        }

        return sb.toString();
    }
79774
public boolean remove(final T element) {
    for (int i = 0; i < this.size; i++)
      if (this.elements[i].equals(element)) {
        System.arraycopy(this.elements, i + 1, this.elements, i, this.size - (i + 1));
        this.size--;
        return true;
      }
    return false;
  }
843576
public boolean contains(long key) {
		if (size == 0) {
			return false;
		} 
		if (size == 1) {
			int posDiff = compare(key, rootKey);
			if (posDiff == -1) {
				return true;
			}
			return false;
		}
		Node<V> n = root;
		while (true) {
			if (!doesInfixMatch(n, key)) {
				return false;
			}			
			
			//infix matches, so now we check sub-nodes and postfixes
			if (getBit(key, n.posDiff)) {
				if (n.hi != null) {
					n = n.hi;
					continue;
				} 
				return compare(key,  n.hiPost) == -1;
			} else {
				if (n.lo != null) {
					n = n.lo;
					continue;
				}
				return compare(key,  n.loPost) == -1;
			}
			
		}
	}
810593
function containsAnyOf(str, substrList) {
  for(var i in substrList) if (contains(str, substrList[i])) return true;
  return false;
}
1201566
function(el, sub) {
    sub = normalize(sub);

    DOM.removeAllListeners(el);
    DOM.clearData(el);
    DOM.clean(el);

    //el.parentNode.replaceChild(sub, el);
    el.parentNode.insertBefore(sub, el);
    el.parentNode.removeChild(el);

    return sub; 
  }
923752
def checkSubstitute(self, typecode):
        '''
        '''
        if not isinstance(typecode, ElementDeclaration): 
            return False

        try:
            nsuri,ncname = typecode.substitutionGroup
        except (AttributeError, TypeError):
            return False

        if (nsuri,ncname) != (self.schema,self.literal):
            # allow slop with the empty namespace 
            if not nsuri and not self.schema and ncname == self.literal:
                 return True

            return False

        sub = GED(self.schema, self.literal)
        if sub is None or sub is not typecode:
            return False

        return True
80868
public static int count(final String string, final String substring)
   {
      int count = 0;
      int idx = 0;

      while ((idx = string.indexOf(substring, idx)) != -1)
      {
         idx++;
         count++;
      }

      return count;
   }
395943
public boolean contains(final T element) {
        if (element == null) {
            return false;
        }
        return comparator.compare(element, minimum) > -1 && comparator.compare(element, maximum) < 1;
    }
316891
function assertSubstrings(str, substrings) {
  substrings.forEach(function(substring) {
    assert(str.indexOf(substring) !== -1, str +
      ' - string does not contain: ' + substring);
  });
}
330091
public boolean contains(int element) {
    return element >= 0 && this.imported(element) && this.pos.get(Math.abs(element)) >= 0;
  }
523339
public boolean contains(final BinaryString substring) {
		ensureMaterialized();
		substring.ensureMaterialized();
		if (substring.sizeInBytes == 0) {
			return true;
		}
		int find = SegmentsUtil.find(
			segments, offset, sizeInBytes,
			substring.segments, substring.offset, substring.sizeInBytes);
		return find != -1;
	}
181365
public boolean contains(final T element) {
        if (element == null) {
            return false;
        }

        return lowerEndpoint.includes(element) && upperEndpoint.includes(element);
    }
32781
public static boolean hasChildren(final Element el) throws SAXException {
    NodeList children = el.getChildNodes();

    for (int i = 0; i < children.getLength(); i++) {
      Node curnode = children.item(i);

      short ntype =  curnode.getNodeType();
      if ((ntype != Node.TEXT_NODE) &&
          (ntype != Node.CDATA_SECTION_NODE) &&
          (ntype != Node.COMMENT_NODE)) {
        return true;
      }
    }

    return false;
  }
594130
private void _substringmatch() throws
      IOException
  {
    if (debug)
    {
      checkState(reader.curChar == '*');
    }
    builder.type = Type.SUBSTRINGMATCH;
    builder.append("*=");
    reader.next();
    if (debug)
    {
      checkState(reader.curChar == '=');
    }
  }
500558
public static boolean contains(Iterator<?> iterator, @Nullable Object element) {
    return any(iterator, equalTo(element));
  }