pLineEnding

fun <U : Any> pLineEnding(): Parser<Char, Char, U>

Returns a Parser that consumes a line ending (\n, \r\n, or \r not followed by \n) and always succeeds with the normalised newline character '\n'.

The three forms are tried in this order:

  1. \r\n — Windows CRLF

  2. \r not followed by \n — classic Mac CR

  3. \n — Unix LF

Return

a Parser that succeeds with '\n' on any line ending form.

See also