Java Path Normalize normalizeLocalPath(final String localPath)

Here you can find the source of normalizeLocalPath(final String localPath)

Description

Remove any trailing "\" from the end of a windows style local path.

License

Open Source License

Declaration

public static String normalizeLocalPath(final String localPath) 

Method Source Code

//package com.java2s;
// Licensed under the MIT license. See License.txt in the repository root.

public class Main {
    /**/*from www  . j av a 2 s .c o  m*/
     * Remove any trailing "\" from the end of a windows style local path.
     */
    public static String normalizeLocalPath(final String localPath) {
        if (localPath.endsWith("\\") && localPath.length() > 3) //$NON-NLS-1$
        {
            return localPath.substring(0, localPath.length() - 1);
        }
        return localPath;
    }
}

Related

  1. normalizeDbPath(String databasePath)
  2. normalizeDotSegment(String path)
  3. normalizedPath(String original)
  4. normalizeFileSystemPath(String path)
  5. normalizeFullPath(String path)
  6. normalizeMediaPath(String hrefBaseUrl, String localMediaPath, String href)
  7. normalizeName(final String path, final boolean isDirectory)
  8. NormalizeName(String absolutePath)
  9. normalizePath(final String in)