Create a NameMatcher that matches names equaling the given string.
424281
public static <T extends Key <T>> NameMatcher <T> nameEquals (final String compareTo)
  {
    return new NameMatcher <> (compareTo, StringOperatorName.EQUALS);
  }
872433
def match_rstring(self, tokens, item):
        """"""
        name, suffix = tokens
        return self.match_mstring((None, name, suffix), item, use_bytes=suffix.startswith("b"))
1152438
public static <U extends Key <U>> NameMatcher <U> nameStartsWith (final String compareTo)
  {
    return new NameMatcher <> (compareTo, StringOperatorName.STARTS_WITH);
  }
1254772
def match_string(self, tokens, item):
        """"""
        prefix, name = tokens
        return self.match_mstring((prefix, name, None), item, use_bytes=prefix.startswith("b"))
229850
public GroupFilter nameContains(String... subStrings) {
        checkNotNull(subStrings, "Name match criteria must be not a null");

        predicate = predicate.and(combine(
            GroupMetadata::getName, in(asList(subStrings), Predicates::containsIgnoreCase)
        ));

        return this;
    }
495681
def check_match(self, name):
        
        return any(pattern.match(name) for pattern in self.patterns)
726195
function(match, value, shortNames, longNames) {
				return (doubled(match) ? longNames[value] : shortNames[value]);
			}
396665
def _bare_name_matches(self, nodes):
        """"""
        count = 0
        r = {}
        done = False
        max = len(nodes)
        while not done and count < max:
            done = True
            for leaf in self.content:
                if leaf[0].match(nodes[count], r):
                    count += 1
                    done = False
                    break
        r[self.name] = nodes[:count]
        return count, r
1044891
public static <U extends Key <U>> NameMatcher <U> nameContains (final String compareTo)
  {
    return new NameMatcher <> (compareTo, StringOperatorName.CONTAINS);
  }
819591
public NamedPatternMatch<E> match(final String string) {
        final Matcher matcher = pattern.matcher(string);
        while (matcher.find()) {

            final int start = matcher.start();
            final int end = matcher.end();

            if (start == 0 && end == string.length()) {
                final Map<E, String> resultMap = new EnumMap<>(groupEnum);
                final Set<Entry<E, Integer>> entries = groupIndexes.entrySet();
                for (final Entry<E, Integer> entry : entries) {
                    final E group = entry.getKey();
                    final Integer groupIndex = entry.getValue();
                    final String result = matcher.group(groupIndex);
                    resultMap.put(group, result);
                }
                return new NamedPatternMatch<>(resultMap);
            }
        }

        return null;
    }
956277
public static OpPredicate nameEquals(final String name){
        return new OpPredicate() {
            @Override
            public boolean matches(SameDiff sameDiff, DifferentialFunction function) {
                return function.getOwnName().equals(name);
            }
        };
    }
110693
def name_matches(self, name: str) -> bool:
        
        return bool(self.regex.match(name))
1113192
def normalize_name(name):
    
    if not name or not isinstance(name, basestring):
        raise ValueError('Can only normalize non-empty string names. Unexpected '+ repr(name))

    if len(name) > 1:
        name = name.lower()
    if name != '_' and '_' in name:
        name = name.replace('_', ' ')

    return canonical_names.get(name, name)
711918
def name_match(self, elt):
        '''
        '''
        return self.pname == elt.localName and \
                    self.nspname in [None, '', elt.namespaceURI]
1358629
protected String getMatcherString(MatchType matchType, String paramName) {
    String matchB;
    if (matchType == MatchType.DECOMPOSE || matchType == MatchType.ANY) {
      matchB = "any()";
    } else {
      matchB = "eq(" + paramName + ".t)";
    }
    return matchB;
  }
74719
def match_string(self, string, word=0, offset=0):
        
        if word:
            return self.get_string(offset) == string
        return self.get_length(len(string), offset) == string
389664
public static <T extends NamedElement> ElementMatcher.Junction<T> nameContains(String infix) {
        return new NameMatcher<T>(new StringMatcher(infix, StringMatcher.Mode.CONTAINS));
    }