func print()

in Sources/SwiftFormatPrettyPrint/Verbatim.swift [94:114]


  func print(indent: [Indent]) -> String {
    var output = ""
    for i in 0..<lines.count {
      if lines[i] != "" {
        switch indentingBehavior {
        case .firstLine where i == 0, .allLines:
          output += indent.indentation()
        case .none, .firstLine:
          break
        }
        if leadingWhitespaceCounts[i] > 0 {
          output += String(repeating: " ", count: leadingWhitespaceCounts[i])
        }
        output += lines[i]
      }
      if i < lines.count - 1 {
        output += "\n"
      }
    }
    return output
  }