Documentation ¶
Index ¶
- func DecodeNonUTF8Bytes(data []byte) []byte
- func DecodeNonUTF8String(data string) string
- func ReplaceLineTerminator(data, newLineTerminator []byte) ([]byte, error)
- func ReplaceLineTerminatorBytesReader(data *bytes.Reader, newLineTerminator []byte) ([]byte, error)
- func ToUTF8(data []byte) ([]byte, error)
- type LineTerminatorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeNonUTF8Bytes ¶ added in v0.0.76
func DecodeNonUTF8String ¶ added in v0.0.70
func ReplaceLineTerminator ¶ added in v0.0.40
ReplaceLineTerminator is delegated to find the line terminator of the given byte array and replace them without the one provided in input
func ReplaceLineTerminatorBytesReader ¶ added in v0.0.41
ReplaceLineTerminatorBytesReader is delegated to find the line terminator of the given byte array and replace them without the one provided in input
Types ¶
type LineTerminatorType ¶
type LineTerminatorType string
const ( LF LineTerminatorType = "\n" // 0a -- 10 CR LineTerminatorType = "\r" // 0d -- 13 CRLF LineTerminatorType = "\r\n" // 0d,0a -- 13,10 LFCR LineTerminatorType = "\n\r" // 0a,0d -- 10,13 RS LineTerminatorType = "\036" // 1e -- 30 ND LineTerminatorType = `unable to detect line terminator` )
func DetectLineTerminator ¶
func DetectLineTerminator(reader io.Reader) (LineTerminatorType, error)
Click to show internal directories.
Click to hide internal directories.