Documentation
¶
Index ¶
- type Rope
- func (r *Rope) AllContains(substr string) bool
- func (r *Rope) AllPrefix(prefix string) bool
- func (r *Rope) AllSuffix(suffix string) bool
- func (r *Rope) AnyContains(substr string) bool
- func (r *Rope) AnyPrefix(prefix string) bool
- func (r *Rope) AnySuffix(suffix string) bool
- func (r *Rope) Append(parts ...string) *Rope
- func (r *Rope) Get(pos int) string
- func (r *Rope) Has(part string) bool
- func (r *Rope) Join(glue string) *Rope
- func (r *Rope) Length() int
- func (r *Rope) Lengths() []int
- func (r *Rope) Prepend(parts ...string) *Rope
- func (r *Rope) RemoveEmpty() *Rope
- func (r *Rope) Size() int
- func (r *Rope) Split(separator string) *Rope
- func (r *Rope) String() string
- func (r *Rope) Strings() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rope ¶
type Rope []string
Rope defines a collection of strings and provides useful functions to work with.
func (*Rope) AllContains ¶
AllContains returns true, when all strings contain the parameter 'substr'.
func (*Rope) AllPrefix ¶
AllPrefix returns true, when all strings have the parameter 'prefix' as prefix.
func (*Rope) AllSuffix ¶
AllSuffix returns true, when all strings have the parameter 'suffix' as suffix.
func (*Rope) AnyContains ¶
AnyContains returns true, when any string exists, which contains the parameter 'substr'.
func (*Rope) AnyPrefix ¶
AnyPrefix returns true, when any string exists, which has the parameter 'prefix' as prefix.
func (*Rope) AnySuffix ¶
AnySuffix returns true, when any string exists, which has the parameter 'suffix' as suffix.
func (*Rope) Get ¶
Get returns the part at the position 'pos'. If 'pos' is invalid, it returns an empty string.
func (*Rope) Join ¶
Join joins all parts together with 'glue' between. The result is a rope with only one string.
func (*Rope) RemoveEmpty ¶
RemoveEmpty removes all empty strings of the rope.