docs: public static int[] getViewToHeaderBodyPosition(JTextArea view, String header, int start, int end) {
          validateView(view);
          validateHeader(header);
          validateStartEnd(start, end);
  
          if (!isValidStartEndForLength(start, end, view.getDocument().getLength())) {
              return INVALID_POSITION;
          }
  
          int excessChars = 0;
          int pos = 0;
          while ((pos = header.indexOf("\r\n", pos)) != -1) {
              pos += 2;
              ++excessChars;
          }
  
          if (start + excessChars < header.length()) {
              int[] position = getViewToHeaderPositionImpl(view, start, end);
              if (position[1] > header.length()) {
                  position[1] = header.length();
              }
              return position;
          }
  
          int finalStartPos = start + excessChars - header.length();
          int finalEndPos = end + excessChars - header.length();
          return new int[] { finalStartPos, finalEndPos, 0 };
      }