private String getVariantKey ( String contextPath ) { // Remove first slash String resultPath = contextPath . substring ( 1 ) ; String variantKey = "" ; // eval the existence of a suffix String prefix = resultPath . substring ( 0 , resultPath . indexOf ( JawrConstant . URL_SEPARATOR ) ) ; // The prefix also contains variant information after a '.' if ( prefix . indexOf ( ' ' ) != - 1 ) { variantKey = prefix . substring ( prefix . indexOf ( ' ' ) + 1 ) ; } return variantKey . trim ( ) ; }
Returns the variant key from the context path .