code: public static Version toVersion(String version, final Version defaultValue) {
  	// remove extension if there is any
  	final int rIndex = version.lastIndexOf(".lco");
  	if (rIndex != -1) version = version.substring(0, rIndex);
  
  	try {
  	    return Version.parseVersion(version);
  	}
  	catch (final IllegalArgumentException iae) {
  	    return defaultValue;
  	}
      }
docs: cast a lucee string version to a int version
  
  @param version
  @return int version