Java Path String Clean cleanPath(String path)

Here you can find the source of cleanPath(String path)

Description

clean Path

License

Open Source License

Declaration

public static String cleanPath(String path) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String cleanPath(String path) {
        while (path.endsWith("/") && path.length() > 1) {
            path = path.substring(0, path.length() - 1);
        }/* w  w  w .  j a  v  a 2 s  .  co m*/
        return path;
    }
}

Related

  1. cleanPath(String loc)
  2. cleanPath(String path)
  3. cleanPath(String path)
  4. cleanPath(String path)
  5. cleanPath(String path)
  6. cleanPath(String path)
  7. cleanPath(String path)
  8. cleanPath(String path, boolean trimStartSeparator)
  9. cleanPath(String s)