Normalize camelCase entries in path.
776297
def NormalizeRelativePath(path):
        """"""
        path_components = path.split('/')
        normalized_components = []
        for component in path_components:
            if re.match(r'{[A-Za-z0-9_]+}$', component):
                normalized_components.append(
                    '{%s}' % Names.CleanName(component[1:-1]))
            else:
                normalized_components.append(component)
        return '/'.join(normalized_components)
779600
def normalize_camel_case(name):
    
    normalized = re.sub('([a-z])([A-Z])',
                        lambda match: ' '.join([match.group(1), match.group(2)]),
                        name)
    return normalized[0].upper() + normalized[1:]
23991
protected String normalizePath(String path) {

        if (path.equals("/")) {
            return path;
        } else {
            return CmsFileUtil.removeTrailingSeparator(path);
        }

    }
1363052
function normalizePath(path = '') {

  // Remove the trailing slash if one has been given
  if(path.length > 1 && path.endsWith('/')) {
    path = path.slice(0, -1);
  }

  // Remove the first slash
  if(path.startsWith('/')) {
    path = path.slice(1);
  }

  // Remove the query if it exists
  if(path.includes('?')) {
    path = path.split('?')[0];
  }

  // Decode the url
  path = decodeURIComponent(path);

  return path;
}
1259267
def normpath(path, keep_trailing=False):
    """"""
    new_path = k_paths.normpath(path)
    if keep_trailing and path.endswith("/") and not new_path.endswith("/"):
        new_path = new_path + "/"
    if not new_path.startswith('/'):
        return '/' + new_path
    return new_path
695099
public static String normalizePath(String path)
  {
    if(File.separatorChar == '/') {
      return path.replace('\\', '/');
    }
    return path.replace('/', '\\');
  }
222859
function normalizePath(urlPath) {
  if (!urlPath) {
    return '';
  // make sure path starts with a /
  } else if (_.head(urlPath) !== '/') {
    urlPath = '/' + urlPath;
  }
  // make sure path does not end with a /
  return _.trimEnd(urlPath, '/');
}
232567
private String normalizeFilePath(final String path) {
        String normalizedPath = path.replace('\\', '/');

        if (!normalizedPath.startsWith("/")) {
            normalizedPath = "/" + normalizedPath;
        }

        return normalizedPath;
    }
1283053
def _normalise_path(path: Union[str, pathlib.Path]) -> pathlib.Path:
    
    if isinstance(path, str):
        return pathlib.Path(path)
    return path
507332
private function normalizePaths()
    {
        foreach ($this->paths as $key => $path) {
            $this->paths[$key] = $this->normalizePath($path);
        }
    }
1088012
public static String normalizePath(String path, String separator) {
    return path.endsWith(separator) ? path : path + separator;
  }
695720
function normalizePath(fsPath) {
  fsPath = path.normalize(fsPath);

  if (process.platform === 'win32') {
    fsPath = fsPath.replace(backwardSlashRegExp, '/');
  }

  return fsPath;
}
1128935
private byte[] normalize(byte[] path) {
    if (path.length == 0)
      return path;
    byte prevC = 0;
    for (int i = 0; i < path.length; i++) {
      byte c = path[i];
      if (c == '\\')
        return normalize(path, i);
      if (c == (byte) '/' && prevC == '/')
        return normalize(path, i - 1);
      if (c == '\u0000')
        throw new InvalidPathException(this.hdfs.getString(path),
            "Path: nul character not allowed");
      prevC = c;
    }
    return path;
  }
1044703
def normalize(cls, name):
        """"""
        name = name.lower() # lower-case
        for _replace in [' ','-','(',')','?']:
            name = name.replace(_replace,'')
        return name
63786
private String normalizePath(final String subPath) {
        if(subPath == null) {
            return "";
        }
        
        String value = subPath.trim();
        if(value.isEmpty()) {
            return value;
        }
        
        if(value.startsWith(PATH_SEPARATOR)) {
            value = value.substring(1);
        }
        
        if(value.endsWith(PATH_SEPARATOR)) {
            value = value.substring(0, value.length()-1);
        }
        
        return value;
        
    }
791924
private static String normalize(final List<String> path, boolean absolute) {
        assert path != null : "path must be specified";

        // Remove unnecessary references to this dir
        if (path.contains(DIR_THIS)) {
            path.remove(DIR_THIS);
            normalize(path, absolute);
        }

        // Remove unnecessary references to the back dir, and its parent
        final int indexDirBack = path.indexOf(DIR_BACK);
        if (indexDirBack != -1) {
            if (indexDirBack > 0) {
                path.remove(indexDirBack);
                path.remove(indexDirBack - 1);
                normalize(path, absolute);
            } else {
                throw new IllegalArgumentException("Cannot specify to go back \"../\" past the root");
            }
        }

        // Nothing left to do; reconstruct
        final StringBuilder sb = new StringBuilder();
        if (absolute) {
            sb.append(ArchivePath.SEPARATOR);
        }
        for (int i = 0; i < path.size(); i++) {
            if (i > 0) {
                sb.append(ArchivePath.SEPARATOR);
            }
            sb.append(path.get(i));
        }
        return sb.toString();
    }
727015
def normalize!
      if path && path == ''
        set_path('/')
      end
      if scheme && scheme != scheme.downcase
        set_scheme(self.scheme.downcase)
      end
      if host && host != host.downcase
        set_host(self.host.downcase)
      end        
    end