code: 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);
      }
docs: Remove a part of a CharSequence by replacing the first occurrence
  of target within self with '' and returns the result.
  
  @param self   a CharSequence
  @param target an object representing the part to remove
  @return a String containing the original minus the part to be removed
  @see #minus(String, Object)
  @since 1.8.2