code: public static String leftPad(String text, String padding, int linesToIgnore) {
          StringBuilder result = new StringBuilder();
          Matcher matcher = LINE_START_PATTERN.matcher(text);
  
          while (matcher.find()) {
              if (linesToIgnore > 0) {
                  linesToIgnore--;
              } else {
                  result.append(padding);
              }
              result.append(matcher.group()).append("\n");
          }
          return result.toString();
      }
docs: Inserts the specified string at the beginning of each newline of the specified text.
  
  @param text          the text to pad.
  @param padding       the padding.
  @param linesToIgnore the number of lines to ignore before starting the padding.
  @return the padded text.