Here you can find the source of normalisePath(final String path)
Parameter | Description |
---|---|
path | a parameter |
public static String normalisePath(final String path)
//package com.java2s; /******************************************************************************* * Manchester Centre for Integrative Systems Biology * University of Manchester//from www. j a v a2s .c o m * Manchester M1 7ND * United Kingdom * * Copyright (C) 2007 University of Manchester * * This program is released under the Academic Free License ("AFL") v3.0. * (http://www.opensource.org/licenses/academic.php) *******************************************************************************/ public class Main { /** * * @param path * @return String */ public static String normalisePath(final String path) { final char BACK_SLASH = '\\'; final char FORWARD_SLASH = '/'; final String SPACE = " "; //$NON-NLS-1$ final String SPACE_ESCAPE = "%20"; //$NON-NLS-1$ return path.replace(BACK_SLASH, FORWARD_SLASH).replace(SPACE, SPACE_ESCAPE); } }