public static String canonicalizeUriString(String location) {
    // get rid of file prefix, if any
    String uriString = location.trim();
    if (uriString.startsWith("file://"))
      uriString = uriString.substring(7);
    else if (uriString.startsWith("file:"))
      uriString = uriString.substring(5);

    // get rid of crappy microsnot \ replace with happy /
    return StringUtil2.replace(uriString, '\\', "/");
  }
public static String canonicalizeUriString(String location) {
    
    String uriString = location.trim();
    if (uriString.startsWith("file:
      uriString = uriString.substring(7);
    else if (uriString.startsWith("file:"))
      uriString = uriString.substring(5);

    
    return StringUtil2.replace(uriString, '\\', "/");
  }
public static String canonicalizeUriString ( String location ) { // get rid of file prefix, if any String uriString = location . trim ( ) ; if ( uriString . startsWith ( "file://" ) ) uriString = uriString . substring ( 7 ) ; else if ( uriString . startsWith ( "file:" ) ) uriString = uriString . substring ( 5 ) ; // get rid of crappy microsnot \ replace with happy / return StringUtil2 . replace ( uriString , ' ' , "/" ) ; }
Removes the {@code "file:"} or {@code "file://"} prefix from the location, if necessary. Also replaces
back slashes with forward slashes.

@param location  a URI string.
@return  a canonical URI string.
Removes the { @code file : } or { @code file : // } prefix from the location if necessary . Also replaces back slashes with forward slashes .