private String removeEngineInit ( String script ) { int start = script . indexOf ( ENGINE_INIT ) ; int end = start + ENGINE_INIT . length ( ) ; StringBuffer rets = new StringBuffer ( ) ; if ( start > 0 ) { rets . append ( script . substring ( 0 , start ) ) . append ( "\n" ) ; } rets . append ( script . substring ( end ) ) ; return rets . toString ( ) ; }
Removes the engine init script so that it is not repeated unnecesarily .