diff -r d9a4b3a73d8c -r 19a7046f90f9 src/Pure/library.scala --- a/src/Pure/library.scala Wed Jan 18 16:04:51 2023 +0100 +++ b/src/Pure/library.scala Wed Jan 18 16:15:41 2023 +0100 @@ -94,6 +94,8 @@ /* lines */ + def count_newlines(str: String): Int = str.count(_ == '\n') + def terminate_lines(lines: IterableOnce[String]): String = { val it = lines.iterator if (it.isEmpty) "" else it.mkString("", "\n", "\n")