Create a NameMatcher that matches names ending with the given string.
502732
public static <U extends Key <U>> NameMatcher <U> nameEndsWith (final String compareTo)
  {
    return new NameMatcher <> (compareTo, StringOperatorName.ENDS_WITH);
  }
277909
function colorCodeToShorterNames(string) {
  Object.keys(shorterNames).forEach(function(key, i) {
    if (shorterNames[key].test(string)) {
      string = string.replace(shorterNames[key], key);
    }
  });

  return string;
}
498319
def match(self, string):
        """"""
        if self.casesensitive:
            return fnmatch.fnmatch(string, self.pattern)
        else:
            return fnmatch.fnmatch(string.lower(), self.pattern.lower())
850718
def matchremove_noun_endings(word):
    """"""

    was_stemmed = False

    """common and proper noun and adjective word endings sorted by charlen, then alph"""
    noun_endings = ['arons', 'ains', 'aron', 'ment', 'ain', 'age', 'on', 'es', 'ée', 'ee', 'ie', 's']

    for ending in noun_endings:
        """ignore exceptions"""
        if word in exceptions:
            word = word
            was_stemmed = True
            break
        if word == ending:
            word = word
            was_stemmed = True
            break
        """removes noun endings"""
        if word.endswith(ending):
            word = re.sub(r'{0}$'.format(ending), '', word)
            was_stemmed = True
            break

    return word, was_stemmed
110693
def name_matches(self, name: str) -> bool:
        
        return bool(self.regex.match(name))
178917
def _process_name(name):
    """"""

    # Unescape HTML entities
    name = unescape(name)

    # Remove bracketed stuff on the end
    name = NG_RE.sub('', name).strip()  # Nomenclature groups
    name = END_RE.sub('', name).strip(', ')  # Words
    name = RATIO_RE.sub('', name).strip(', ')  # Ratios

    # Remove stuff off start
    name = START_RE.sub('', name).strip()

    # Remove balanced start and end brackets if none in between
    name = BRACKET_RE.sub('\g<1>', name)

    # Un-invert CAS style names
    comps = name.split(', ')
    if len(comps) == 2:
        if comps[1].endswith('-'):
            name = comps[0]
            name = '%s%s' % (comps[1], name)
    elif len(comps) > 2:
        name = comps[0]
        for i in range(1, len(comps)):
            if comps[i].endswith('-'):
                name = '%s%s' % (comps[i], name)
            else:
                name = '%s %s' % (name, comps[i])
    return name
117760
def _ParseNamesString(self, names_string):
    
    if not names_string:
      return

    names_string = names_string.lower()
    names = [name.strip() for name in names_string.split(',')]
    file_entry_filter = file_entry_filters.NamesFileEntryFilter(names)
    self._filter_collection.AddFilter(file_entry_filter)
1165677
def namespace_match(pattern: str, namespace: str):
    
    if pattern[0] == '*' and namespace.endswith(pattern[1:]):
        return True
    elif pattern == namespace:
        return True
    return False
722373
def match_filenames(filenames, pattern):
    """"""
    matching = []

    for filename in filenames:
        if fnmatch(get_filebase(filename, pattern), globify(pattern)):
            matching.append(filename)

    return matching
1076932
def fully_qualified_name_regexp
      Regexp.new(namespace_path.map(&:name)
                               .map { |n| Regexp.escape(n) }
                               .join('(?:<.*?>)?\.'))
    end
595339
private void matchNames(@NonNull ArrayMap<View, TransitionValues> unmatchedStart,
                            @NonNull ArrayMap<View, TransitionValues> unmatchedEnd,
                            @NonNull ArrayMap<String, View> startNames,
                            @NonNull ArrayMap<String, View> endNames) {
        int numStartNames = startNames.size();
        for (int i = 0; i < numStartNames; i++) {
            View startView = startNames.valueAt(i);
            if (startView != null && isValidTarget(startView)) {
                View endView = endNames.get(startNames.keyAt(i));
                if (endView != null && isValidTarget(endView)) {
                    TransitionValues startValues = unmatchedStart.get(startView);
                    TransitionValues endValues = unmatchedEnd.get(endView);
                    if (startValues != null && endValues != null) {
                        mStartValuesList.add(startValues);
                        mEndValuesList.add(endValues);
                        unmatchedStart.remove(startView);
                        unmatchedEnd.remove(endView);
                    }
                }
            }
        }
    }
141735
public static <T> Collection<T> matchToString(Collection<T> values, String name) {
        List<T> result = new ArrayList<>();
        for (T value : values) {
            if (value == null) {
                continue;
            }
            if (startsWithIgnoreCase(value.toString(), name)) {
                result.add(value);
            }
        }
        return result;
    }
11692
public static Map<String,String> getNamesWithAliases(String nameList) {
        String[] names = nameList.split(",");
        Map<String,String> results = new LinkedHashMap<>();  //retain ordering / determinism
        for ( String p : names) {
            String configName = p.trim();

            if ( configName.length() > 0) {
                Matcher matcher = nameWithAlias.matcher(configName);
                if (matcher.matches()) {
                    results.put(matcher.group(2), matcher.group(1));
                } else {
                    results.put(configName, configName);
                }
            }
        }
        return results;
    }
696275
static private boolean matchPrefix(String s1, String s2) {
    return s1.startsWith(s2) || s2.startsWith(s1);
  }
872433
def match_rstring(self, tokens, item):
        """"""
        name, suffix = tokens
        return self.match_mstring((None, name, suffix), item, use_bytes=suffix.startswith("b"))
746093
def _join_names(names):
    """"""

    levels = (str(name) for name in names if name != '')
    return '_'.join(levels)
8854
function makeFilenameRegex(name) {
  if (!_.isString(name)) {
    throw new TypeError('name parameter must be of type "String"');
  }

  const regexString = `^${name}(?:[.](.+))?.(${fileExtensions.join('|')})$`;
  return new RegExp(regexString);
}