Skip to main content

Module nl

Module nl 

Source

Structs§

NlConfig
Configuration for the nl command.

Enums§

NumberFormat
Number format for line numbers.
NumberingStyle
Line numbering style.

Functions§

nl
Number lines and write to the provided writer.
nl_stream_with_state
Stream nl output directly to a file descriptor in batched writes. This is the preferred entry point for the binary — avoids building the entire output in memory and instead flushes ~1MB chunks. For large files this dramatically reduces memory usage and write() syscall overhead.
nl_to_vec
Build the nl output into a Vec.
nl_to_vec_with_state
Build the nl output into a Vec, continuing numbering from line_number. Updates line_number in place so callers can continue across multiple files.
parse_number_format
Parse a number format string.
parse_numbering_style
Parse a numbering style string.