fitgoodies-core/src/main/java/de/cologneintelligence/fitgoodies/file/FileSystemDirectoryHelper.java
public String removePrefix(final String path, final String prefix) {
		String pathWithoutPrefix = path;

		if (pathWithoutPrefix.startsWith(prefix)) {
			pathWithoutPrefix = pathWithoutPrefix.substring(prefix.length());

			while (pathWithoutPrefix.startsWith("/") || pathWithoutPrefix.startsWith("\\")) {
				pathWithoutPrefix = pathWithoutPrefix.substring(1);
			}
		}

		return pathWithoutPrefix;
	}
public String removePrefix(final String path, final String prefix) {
		String pathWithoutPrefix = path;

		if (pathWithoutPrefix.startsWith(prefix)) {
			pathWithoutPrefix = pathWithoutPrefix.substring(prefix.length());

			while (pathWithoutPrefix.startsWith("/") || pathWithoutPrefix.startsWith("\\")) {
				pathWithoutPrefix = pathWithoutPrefix.substring(1);
			}
		}

		return pathWithoutPrefix;
	}
public String removePrefix ( final String path , final String prefix ) { String pathWithoutPrefix = path ; if ( pathWithoutPrefix . startsWith ( prefix ) ) { pathWithoutPrefix = pathWithoutPrefix . substring ( prefix . length ( ) ) ; while ( pathWithoutPrefix . startsWith ( "/" ) || pathWithoutPrefix . startsWith ( "\\" ) ) { pathWithoutPrefix = pathWithoutPrefix . substring ( 1 ) ; } } return pathWithoutPrefix ; }
Removes a prefix from a path. If the path does not start with the prefix,
the unchanged path is returned.

@param path   the full path
@param prefix prefix to remove
@return {@code path} without prefix, or {@code path} itself
unless it doesn't start with the prefix.
Removes a prefix from a path . If the path does not start with the prefix the unchanged path is returned .