Java Path Normalize normalizePath(final String in)

Here you can find the source of normalizePath(final String in)

Description

normalize Path

License

LGPL

Declaration

public static String normalizePath(final String in) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static String normalizePath(final String in) {
        String out = in;//from  w  w  w  .java2s . c o  m
        if (in.endsWith("/")) {
            out = in.substring(0, in.length() - 1);
        }
        return out.replace("\\", "/");
    }
}

Related

  1. normalizeFullPath(String path)
  2. normalizeLocalPath(final String localPath)
  3. normalizeMediaPath(String hrefBaseUrl, String localMediaPath, String href)
  4. normalizeName(final String path, final boolean isDirectory)
  5. NormalizeName(String absolutePath)
  6. normalizePath(final String path)
  7. normalizePath(final String path)
  8. normalizePath(final String path)
  9. normalizePath(final String path)