code: private static int removeCommonStartCharHelper(
        List<String> lines, char charToRemove, boolean shouldRemoveMultiple) {
  
      int numCharsToRemove = 0;
  
      // Count num chars to remove.
      boolean isStillCounting = true;
      do {
        boolean areAllLinesEmpty = true;
        for (String line : lines) {
          if (line.length() == 0) {
            continue; // empty lines are okay
          }
          areAllLinesEmpty = false;
          if (line.length() <= numCharsToRemove || line.charAt(numCharsToRemove) != charToRemove) {
            isStillCounting = false;
            break;
          }
        }
        if (areAllLinesEmpty) {
          isStillCounting = false;
        }
        if (isStillCounting) {
          numCharsToRemove += 1;
        }
      } while (isStillCounting && shouldRemoveMultiple);
  
      // Perform the removal.
      if (numCharsToRemove > 0) {
        for (int i = 0; i < lines.size(); i++) {
          String line = lines.get(i);
          if (line.length() == 0) {
            continue; // don't change empty lines
          }
          lines.set(i, line.substring(numCharsToRemove));
        }
      }
  
      return numCharsToRemove;
    }
docs: Private helper for {@code cleanSoyDocHelper()}. Removes a common character at the start of all
  lines, either once or as many times as possible.
  
  <p>Special case: Empty lines count as if they do have the common character for the purpose of
  deciding whether all lines have the common character.
  
  @param lines The list of lines. If removal happens, then the list elements will be modified.
  @param charToRemove The char to remove from the start of all lines.
  @param shouldRemoveMultiple Whether to remove the char as many times as possible.
  @return The number of chars removed from the start of each line.