def tail

ezx@1.11.0.0 · src/init/plan.bend:102

import ezx@1.11.0.0/src/init/plan.bend as Plan
import Base

102# a file's text with a newline on the end, so what is appended to it starts on
103# a line of its own. An empty file gets none, or the append would open with a
104# blank line.
105def tail(+text: String) -> String:
106  Bool.pick(String, Bool.or(String.is_empty(text), String.ends_with(text, "\n")),
107    text, text ++ "\n")

Uses (6)

Used by (1)