package text
import "github.com/shuLhan/share/lib/text"
Package text provide common a library for working with text.
Index ¶
Functions ¶
func JoinChunks ¶
JoinChunks all chunk's values using `sep` as separator and return it as string.
Types ¶
type Chunk ¶
Chunk represent subset of line, contain starting position and slice of bytes in line.
func (Chunk) MarshalJSON ¶
MarshalJSON encode the Chunk into JSON value.
func (Chunk) String ¶
type Chunks ¶
type Chunks []Chunk
Chunks represent a set of chunk.
func (*Chunks) Join ¶
Join all chunk's values using `sep` as separator and return it.
type Line ¶
Line represent line number and slice of bytes as string.
func (Line) MarshalJSON ¶
MarshalJSON encode the Line into JSON value.
func (Line) String ¶
type Lines ¶
type Lines []Line
Lines represent array of line.
func ParseLines ¶
ParseLines convert raw bytes into Lines.
Source Files ¶
chunk.go chunks.go line.go lines.go text.go
Directories ¶
Path | Synopsis |
---|---|
lib/text/diff | Package diff implement text comparison. |
- Version
- v0.53.1 (latest)
- Published
- Mar 2, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 5 days ago –
Tools for package owners.