Subclasses should override to specify the default suffix, as the
        invocation is done without a suffix.
167121
def resolve_parent_registry_name(self, registry_name, suffix):
        

        if not registry_name.endswith(suffix):
            raise ValueError(
                "child module registry name defined with invalid suffix "
                "('%s' does not end with '%s')" % (registry_name, suffix))
        return registry_name[:-len(suffix)]
1199599
def add_suffix(file_path, suffix='modified', sep='_', ext=None):
    """"""
    return _add_suffix(file_path, suffix, sep, ext)
1225551
def accept_override(self):
        """"""
        conflicts = self.check_conflicts()
        if conflicts:
            for shortcut in conflicts:
                shortcut.key = ''
        self.accept()
865356
def suffix?(suffix, text)
      len = suffix.length
      len <= text.length and suffix == text[-len, len]
    end
849062
def remove_suffix(text, suffix):
	
	rest, suffix, null = text.partition(suffix)
	return rest
787691
public String removeSuffix(String original, String suffix) {
        if (original.endsWith(suffix)) {
            return original.substring(0, original.length() - suffix.length());
        }
        return original;
    }
584690
public function setSuffix($suffix)
    {
        $this->_suffix = $suffix;
        $this->request->setPathInfo(implode('/', [$this->module->id, $suffix]));
    }
1208777
def suffix
      suffix = ENV['LONO_SUFFIX'] # highest precedence
      suffix ||= Cfn::Current.suffix
      unless suffix
        settings = Setting.new.data
        suffix ||= settings["stack_name_suffix"] # lowest precedence
      end

      return if suffix&.empty?
      suffix
    end
411593
def suffix(handlers, default=None, error='The requested suffix does not match any of those allowed'):
    
    def output_type(data, request, response):
        path = request.path
        handler = default
        for suffix_test, suffix_handler in handlers.items():
            if path.endswith(suffix_test):
                handler = suffix_handler
                break

        if not handler:
            raise falcon.HTTPNotAcceptable(error)

        response.content_type = handler.content_type
        return handler(data, request=request, response=response)
    output_type.__doc__ = 'Supports any of the following formats: {0}'.format(', '.join(function.__doc__ for function in
                                                                                        handlers.values()))
    output_type.content_type = ', '.join(handlers.keys())
    return output_type
269321
protected final String buildDefaultName(String prefix, String intermediateName, String suffix) {
        return prefix + intermediateName + suffix;
    }
885891
def override_spec(cls, **kwargs):
        """"""
        cls._default_spec.set(**kwargs)
        cls.spec.set(**kwargs)
144432
function(fn, suffix) {
	if(suffix.charAt(0) !== '.') {
		suffix = '.' + suffix;
	}
	
	if(fn.length <= suffix.length) {
		return false;
	}
	
	var str = fn.substring(fn.length - suffix.length).toLowerCase();
	suffix = suffix.toLowerCase();
	return str === suffix;
}
1267912
private static URI addSuffix(final URI href, final String suffix) {
        return URI.create(addSuffix(href.toString(), suffix));
    }
568688
private void overrideUseMavenPatterns(T overrider, Class overriderClass) {
        if (useMavenPatternsOverrideList.contains(overriderClass.getSimpleName())) {
            try {
                Field useMavenPatternsField = overriderClass.getDeclaredField("useMavenPatterns");
                useMavenPatternsField.setAccessible(true);
                Object useMavenPatterns = useMavenPatternsField.get(overrider);

                if (useMavenPatterns == null) {
                    Field notM2CompatibleField = overriderClass.getDeclaredField("notM2Compatible");
                    notM2CompatibleField.setAccessible(true);
                    Object notM2Compatible = notM2CompatibleField.get(overrider);
                    if (notM2Compatible instanceof Boolean && notM2Compatible != null) {
                        useMavenPatternsField.set(overrider, !(Boolean)notM2Compatible);
                    }
                }
            } catch (NoSuchFieldException | IllegalAccessException e) {
                converterErrors.add(getConversionErrorMessage(overrider, e));
            }
        }
    }
1167305
public static String removeSuffix(String filename, String suffix) {
    if (filename.endsWith(suffix)) {
      return filename.substring(0, filename.length() - suffix.length());
    }
    return filename;
  }
1184395
@Override
	public void setDefaultPrefix(final String prefixString) {
		lock.writeLock().lock();
		try {
			if (prefixString == null || StringUtils.isBlank(prefixString)) {
				defaultPrefix = null;
			} else {
				if (prefixes != null) {
					if (!prefixes.contains(prefixString)) {
						throw new IllegalArgumentException("The given prefix is not part of the prefixes.");
					}
				}
				defaultPrefix = prefixString;
			}
		} finally {
			lock.writeLock().unlock();
		}
	}
1267644
def __ensure_suffix(t, suffix):
    
    tpath = str(t)
    if not tpath.endswith(suffix):
        return tpath+suffix
    
    return t