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 ; } }
cast a lucee string version to a int version