fn apply_chomping(s: String, mode: ChompingMode) -> StringExpand description
Apply chomping mode to a block-scalar tail.
The collectors emit a \n for every line (content or blank). This helper
trims that tail according to spec ยง8.1.1.2:
- Strip: remove every trailing
\n. - Clip: keep exactly one trailing
\nif content exists; drop the rest. Empty input stays empty. - Keep: preserve everything.