Module difft::lines[][src]

Expand description

Manipulate lines of text and groups of lines.

Structs

A distinct number type for line numbers, to prevent confusion with other numerical data.

A position in a single line of a string.

A struct for efficiently converting absolute string positions to line-relative positions.

Traits

Functions

Return the length of s in bytes.

Return the length of s in codepoints. This is important when finding character boundaries for slicing without errors.

Split s on \n or \r\n. Always returns a non-empty vec. Does not include the trailing newline.