Impl.read_line.unended: def of bend-stdio-pipes@0.2.0.0 Import: import bend-stdio-pipes@0.2.0.0/impl.bend as Impl Lines 47-55 of bend-stdio-pipes@0.2.0.0/impl.bend: https://jend.leeeet.dev/read.txt?path=bend-stdio-pipes@0.2.0.0/impl.bend&start_line=47&end_line=55 import Base # The line of a piece that ends with its LF: the piece without the LF, and the CR before it, if any. def read_line.unended(+piece: String) -> String: +line = String.take(piece, Nat.sub(String.length(piece), 1n)) Bool.pick( String, String.ends_with(line, "\r"), String.take(line, Nat.sub(String.length(line), 1n)), line ) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.ends_with https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.take