public static String stripVersionFromRestName(String restName){
  Preconditions.checkNotNull(restName);
  String version=extractDefaultMajorVersionFromRestName(restName);
  String[] segs=restName.split("\\.");
  if (segs.length > 1) {
    version=version + ".";
  }
  return restName.startsWith(version) ? restName.substring(version.length()) : restName;
}

public static String stripVersionFromRestName ( String restName ) { Preconditions . checkNotNull ( restName ) ; String version = extractDefaultMajorVersionFromRestName ( restName ) ; String [ ] segs = restName . split ( "\\." ) ; if ( segs . length > 1 ) { version = version + "." ; } return restName . startsWith ( version ) ? restName . substring ( version . length ( ) ) : restName ; }
returns the rest name with version prefix stripped if it has . returns empty if the rest name only contains the version .
