Documentation
¶
Overview ¶
Package textutil provides byte-level text utilities: binary detection, line counting, JSON encoding, and byte-slice reader adapters.
Index ¶
Constants ¶
View Source
const BinarySniffLength = 8000
BinarySniffLength is the maximum number of bytes scanned for null-byte detection. Matches the heuristic used by Git and most editors.
Variables ¶
This section is empty.
Functions ¶
func CountLines ¶
CountLines returns the number of newline-delimited lines in data. A non-empty buffer without a trailing newline counts the last partial line. Returns 0 for empty data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.