Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transform ¶
func Transform(data []byte, fn RemoveFunc) (result []byte, n int, err error)
Transform removes from the input all carriage returns and replaces multiple whitespaces with one. Illegal bytes in the input are replaced by utf8.RuneError. Not doing so might otherwise turn a sequence of invalid UTF-8 into valid UTF-8. The resulting byte sequence may subsequently contain runes for which t(r) is true that were passed unnoticed.
If fn is not nil Transform removes from the input data all runes r for which fn(r) is true.
Types ¶
type RemoveFunc ¶
Click to show internal directories.
Click to hide internal directories.