Documentation
¶
Index ¶
- func Apply(peer, str string, repl []Replacement) string
- func RemoveMarker(tree opTree, name string) opTree
- func SplitOnMarker(tree opTree, name string) (opTree, opTree)
- type Document
- func (d *Document) Apply(peer string, edits []Replacement)
- func (d *Document) Copy() *Document
- func (d *Document) Edits() []Replacement
- func (d *Document) Freeze() *Document
- func (a *Document) Merge(b *Document)
- func (d *Document) OriginalString() string
- func (d *Document) Replace(peer string, start int, length int, str string)
- func (d *Document) ReverseEdits() []Replacement
- func (d *Document) SplitOnMarker(name string) (opTree, opTree)
- func (d *Document) String() string
- type Replacement
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(peer, str string, repl []Replacement) string
func RemoveMarker ¶ added in v0.0.3
func RemoveMarker(tree opTree, name string) opTree
func SplitOnMarker ¶ added in v0.0.3
func SplitOnMarker(tree opTree, name string) (opTree, opTree)
Types ¶
type Document ¶ added in v0.0.3
type Document struct {
// contains filtered or unexported fields
}
func (*Document) Apply ¶ added in v0.0.3
func (d *Document) Apply(peer string, edits []Replacement)
func (*Document) Edits ¶ added in v0.0.3
func (d *Document) Edits() []Replacement
append Edits that restore the original document
func (*Document) Merge ¶ added in v0.0.3
Merge operations from the same ancestor document into this one
func (*Document) OriginalString ¶ added in v0.0.3
string for the original document
func (*Document) ReverseEdits ¶ added in v0.0.3
func (d *Document) ReverseEdits() []Replacement
append edits that restore the original document
func (*Document) SplitOnMarker ¶ added in v0.0.3
type Replacement ¶
type Set ¶ added in v0.0.2
type Set[T comparable] map[T]bool
func NewSet ¶ added in v0.0.3
func NewSet[T comparable](elements ...T) Set[T]
Click to show internal directories.
Click to hide internal directories.