Replace the spaces in the given name based on the config
        :param name: name to replace spaces in
        :return: name with spaces replaced with the configured character(s) or unchanged if configured
438263
def _replace_spaces(self, name: str) -> str:
        
        if self.replace_spaces:
            return name.strip().replace(' ', str(self.replace_spaces_with))
        return name
547013
def _convert_name(self, name):
        
        if re.search('^\d+$', name):
            if len(name) > 1 and name[0] == '0':
                # Don't treat strings beginning with "0" as ints
                return name
            return int(name)
        return name
1171279
def named_config(name: str, config_dict: typing.Mapping) -> None:
    
    names = (
        name
        if isinstance(name, Iterable) and not isinstance(name, (str, bytes))
        else [name]
    )
    for each in names:
        _config_registry[each] = Config(**config_dict)
127001
public static String fixPropertyName(String name) {
		// captialize every char after the underscore , and remove underscores
		final char[] charArray = name.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (charArray[i] == '_') {
				charArray[i + 1] = Character.toUpperCase(charArray[i + 1]);
			}
		}
		name = new String(charArray).replaceAll("_", "");
		return name;
	}
868415
public CommandOption<T> setting(String name) {

		Assert.notNullOrEmptyTrimmed(name, "Missing setting name");

		name = StringUtils.trim(name);
		String compare = StringUtils.sanitizeWhitespace(name);
		Assert.isTrue(name.equals(compare), "Setting name can not contain whitespace characters!");

		setting = name;
		return this;
	}
847242
private String computeSetterName(String name)
	{
		StringBuilder _result = new StringBuilder().append(PREFIX__SETTER);
		_result.append(Character.toUpperCase(name.charAt(0))).append(name.substring(1));
		return _result.toString();
	}
553617
protected function normalize(string $name): string
    {
        $whitespace = $this->getWhitespace();

        $name = trim($name);

        return preg_replace('/[' . preg_quote($whitespace) . ']+/', ' ', $name);
    }
78343
protected String changeName(String name) {
        String retval=name;
        StringBuilder tmp;

        if(address != null) {
            tmp=new StringBuilder(address);
            retval=retval.replace(ADDR, tmp);
        }
        if(clusterName != null) {
            tmp=new StringBuilder(clusterName);
            retval=retval.replace(CLUSTER, tmp);
        }
        return retval;
    }
80650
def normalize_name(context, constant = nil)
        case context
          when constant
            context.name
          when Symbol
            context.to_s
          else
            context
        end
      end
826609
def with_name(self, name):
        
        # N.B. DOES cleanup query/fragment
        if not isinstance(name, str):
            raise TypeError("Invalid name type")
        if "/" in name:
            raise ValueError("Slash in name is not allowed")
        name = self._PATH_QUOTER(name)
        if name in (".", ".."):
            raise ValueError(". and .. values are forbidden")
        parts = list(self.raw_parts)
        if self.is_absolute():
            if len(parts) == 1:
                parts.append(name)
            else:
                parts[-1] = name
            parts[0] = ""  # replace leading '/'
        else:
            parts[-1] = name
            if parts[0] == "/":
                parts[0] = ""  # replace leading '/'
        return URL(
            self._val._replace(path="/".join(parts), query="", fragment=""),
            encoded=True,
        )
956375
def replace(self, name, newname):
        
        if not re.match("[a-zA-Z]\w*", name):
            return None
        if not re.match("[a-zA-Z]\w*", newname):
            return None

        def _replace(match):
            return match.group(0).replace(match.group('name'), newname)

        pattern = re.compile("(\W|^)(?P<name>" + name + ")(\W|$)")
        cut = re.sub(pattern, _replace, str(self))
        return Cut(cut)
809209
def fix_plugin_name(name)
      name = name.to_s.downcase
      fixes = {
        /[\- ]/ => '_', # dashes and spaces become underscores
        /[^a-z0-9_]/ => '', # anything other than lower case letters, numbers and underscores is removed
        /fastlane[_]?/ => '', # 'fastlane' or 'fastlane_' is removed
        /plugin[_]?/ => '' # 'plugin' or 'plugin_' is removed
      }
      fixes.each do |regex, replacement|
        name = name.gsub(regex, replacement)
      end
      name
    end
938071
def __normalize_name(self, name):
        

        if not name.startswith(self.__root_namespace):
            name = foundations.namespace.set_namespace(self.__root_namespace,
                                                       foundations.namespace.set_namespace(self.__default_namespace,
                                                                                           name))
            LOGGER.debug("> Normalized name: '{0}'.".format(name))
            return name
        else:
            LOGGER.debug("> Name '{0}' is already normalized!".format(name))
            return name
640248
function (name) {
		const leave_lower = ['of', 'the', 'from', 'de', 'le', 'la'];
		// need to find spaces in name and capitalize letter after space
		const parts = name.split(' ');
		const upper_parts = parts.map((w) => {
			return (leave_lower.indexOf(w) >= 0) ? w : `${r_helpers.capitalize(w)}`;
		});
		return upper_parts.join(' ');
	}
1150824
def get_namespace_from_name(name):
    
    if not re.match(NAMESPACE_PATTERN, name):
        sys.exit(("Argument '%s' doesn't match any recognized pattern:\n"
                  "\tfloyd [data] init <project_or_dataset_name>\n"
                  "\tfloyd [data] init <namespace>/<project_or_dataset_name>\n"
                  "\tfloyd [data] init <namespace>/[projects|dataset]/<project_or_dataset_name>\n"
                  "\n Note: Argument can only contain alphanumeric, hyphen-minus '-' , underscore '_' and dot '.' characters."
                  ) % name)

    name_parts = name.split("/", 2)
    if len(name_parts) > 1:
        return name_parts[0], name_parts[-1]
    else:
        return current_username(), name
590538
private String fixName(String name) {
		return name.replace(HibernateLayerUtil.XPATH_SEPARATOR, HibernateLayerUtil.SEPARATOR);
	}
40822
public static RelaxedNames forCamelCase(String name) {
        StringBuilder result = new StringBuilder();
        for (char c : name.toCharArray()) {
            result.append(Character.isUpperCase(c) && result.length() > 0
                          && result.charAt(result.length() - 1) != '-' ? "-" + Character.toLowerCase(c) : c);
        }
        return new RelaxedNames(result.toString());
    }