public static String minus ( CharSequence self , Object target ) { String s = self . toString ( ) ; String text = DefaultGroovyMethods . toString ( target ) ; int index = s . indexOf ( text ) ; if ( index == - 1 ) return s ; int end = index + text . length ( ) ; if ( s . length ( ) > end ) { return s . substring ( 0 , index ) + s . substring ( end ) ; } return s . substring ( 0 , index ) ; }
Remove a part of a CharSequence by replacing the first occurrence of target within self with and returns the result .