{@inheritDoc}

@see java.nio.file.Path#normalize()
500991
@Override
    public Path normalize() {
        final String normalizedString = normalize(tokenize(this), this.isAbsolute());
        final Path normalized = new ShrinkWrapPath(normalizedString, this.fileSystem);
        return normalized;
    }
951976
def normalize_path(url)
      url = URI(url)
      (url.path.start_with?('/') ? url.path : '/' + url.path) +
        (url.query ? "?#{sort_query_params(url.query)}" : '')
    end
1157655
function pathify (dir, file) {
  if (file)
    return path.normalize(path.join(dir, file));
  else
    return path.normalize(dir);
}
156765
public void write(@NonNull Normalizer normalizer, @NonNull String path) throws IOException {
        try (OutputStream out = new BufferedOutputStream(new FileOutputStream(path))) {
            write(normalizer, out);
        }
    }
904592
function normalize(filepath) {

    // resolve to an absolute ppath
    if (!path.isAbsolute || !path.isAbsolute(filepath))
        filepath = path.resolve(path.dirname(module.parent.filename), filepath);

    // tack .json on the end if need be
    if (!/\.json$/.test(filepath))
        filepath = filepath + '.json';

    return filepath;
}
557742
protected Path normalizePath(final Path parent, final String path) {
        return parent.resolve(path).toAbsolutePath().normalize();
    }
880551
function normalize(route) {
  if (is.not.array(route.path) && is.not.string(route.path)) {
    throw new Error(ERR_NORMALIZE_ROUTE);
  }

  if (is.array(route.method)) {
    /* If method is an array */
    route.method.forEach((method, i) => {
      route.method[i] = method.toLowerCase();
    });
  }

  /* If method is a string */
  if (is.string(route.method)) {
    route.method = route.method.toLowerCase();
  }

  return route;
}
251011
private static String normalizePath(final String path, final String separator) {
        final String p = path.replace(WINDOWS_SEPARATOR, separator).replace(UNIX_SEPARATOR, separator);
        // remove "." from the directory.
        final List<String> dirs = new LinkedList<>();
        final StringTokenizer tokenizer = new StringTokenizer(p, separator);
        while (tokenizer.hasMoreTokens()) {
            final String token = tokenizer.nextToken();
            if (!(".".equals(token))) {
                dirs.add(token);
            }
        }

        // remove ".." and the dir name before it.
        int dirNum = dirs.size();
        int i = 0;
        while (i < dirNum) {
            if (i > 0) {
                final String lastDir = dirs.get(i - 1);
                final String dir = dirs.get(i);
                if ("..".equals(dir) && !("..".equals(lastDir))) {
                    dirs.remove(i);
                    dirs.remove(i - 1);
                    dirNum = dirs.size();
                    i = i - 1;
                    continue;
                }
            }

            i++;
        }

        // restore the directory.
        final StringBuilder buff = new StringBuilder(p.length());
        if (p.startsWith(separator + separator)) {
            buff.append(separator).append(separator);
        } else if (p.startsWith(separator)) {
            buff.append(separator);
        }
        final Iterator<String> iter = dirs.iterator();
        while (iter.hasNext()) {
            buff.append(iter.next());
            if (iter.hasNext()) {
                buff.append(separator);
            }
        }
        if (p.endsWith(separator)) {
            buff.append(separator);
        }

        return buff.toString();
    }
885298
static public String normalize(String path, int format) {

        // if normalize is off, just return
        if (NORMALIZE_OFF == format || null == path) {
            return path;
        }
        String normalizedString = path;
        int len = path.length();
        // if there's no data, just return
        if (0 != len) {
            char[] buf = new char[len];
            path.getChars(0, len, buf, 0);
            for (int index = 0; index < len; index++) {
                buf[index] = normalize(buf[index], format);
            }
            normalizedString = new String(buf, 0, len);
        }

        return normalizedString;
    }
586333
function normalizePath(filepath) {
			if (!filepath.length) return filepath;

			// Make all slashes forward
			filepath = filepath.replace(/\\/g, '/');

			// Make sure path ends with a slash
			if (!_s.endsWith(filepath, '/')) {
				filepath += '/';
			}

			return filepath;
		}
1304630
def normalize_path(path, resolve_symlinks=True):
    # type: (str, bool) -> str
    
    path = expanduser(path)
    if resolve_symlinks:
        path = os.path.realpath(path)
    else:
        path = os.path.abspath(path)
    return os.path.normcase(path)
352132
private String normalizePath(String path) {
		// 标准化路径
		path = FileUtil.normalize(path);
		path = StrUtil.removePrefix(path, StrUtil.SLASH);

		Assert.isFalse(FileUtil.isAbsolutePath(path), "Path [{}] must be a relative path !", path);
		return path;
	}
201427
def _normalize_file_path(file_path):
        
        if not file_path:
            return None
        elif file_path.startswith('s3://') or \
                file_path.startswith('http://') or \
                file_path.startswith('https://'):
            return file_path
        return path.abspath(file_path)
786296
private static String normalizePath(String absPath)
   {
      if (absPath.endsWith("/"))
      {
         return absPath.substring(0, absPath.length() - 1);
      }

      return absPath;
   }
232567
private String normalizeFilePath(final String path) {
        String normalizedPath = path.replace('\\', '/');

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

        return normalizedPath;
    }
684801
public static String normalizePath(String path) {
    String normalizedPath = path.replaceAll("//+", "/").replaceFirst("(.+)/$", "$1");
    PathUtils.validatePath(normalizedPath);
    return normalizedPath;
  }
153397
def normalize(path, **kwargs):
    """"""
    import os.path
    return os.path.normpath(path, **kwargs)