initial commits

master
Charles Iliya Krempeaux 2023-11-28 08:14:55 -08:00
parent e2bed68430
commit 97238f4932
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import (
"sourcecode.social/reiver/go-opt" "sourcecode.social/reiver/go-opt"
) )
// ReadEOL tries to read and end-of-line character. // ReadEOL tries to read an end-of-line sequence.
// //
// The end-of-line sequences it supports are: // The end-of-line sequences it supports are:
// //
@ -17,6 +17,10 @@ import (
// line-separator (LS) (U+2028) // line-separator (LS) (U+2028)
// //
// If successful, ReadEOL return the end-of-line sequence it found and the number-of-bytes read (to read in end-of-line sequence it found). // If successful, ReadEOL return the end-of-line sequence it found and the number-of-bytes read (to read in end-of-line sequence it found).
//
// Example usage:
///
// eolSequence, size: err := eol.ReadEOL(runescanner)
func ReadEOL(runescanner io.RuneScanner) (endofline string, size int, err error) { func ReadEOL(runescanner io.RuneScanner) (endofline string, size int, err error) {
if nil == runescanner { if nil == runescanner {
return "", 0, errNilRuneScanner return "", 0, errNilRuneScanner