def text_of.trimmed
import bend-lint-rules@0.2.0.0/layout/format.bend as Formatimport Base
2301# The rows, last first, joined, without the empty rows at the end, with a
2302# newline. Each row has no trailing whitespace already.
2303def text_of.trimmed(rows: List<&2, String>, +newline: String) -> String:
2304 match rows:
2305 case Nil{}:
2306 newline
2307 case Con{row, rest}:
2308 join(rest, newline, row ++ newline)