exrunes

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferFree

func BufferFree(buf *Buffer)

BufferFree destroy buffer contents and return it to storage slice

func Contains

func Contains(haystack []rune, needle []rune) bool

Contains checks if haystack contains passed substring

func ContainsAt

func ContainsAt(haystack []rune, needle []rune, index int) bool

ContainsAt check if haystack has the provided substring in the specific position

func Equal

func Equal(r1, r2 []rune) bool

func HasPrefix

func HasPrefix(haystack []rune, needle []rune) bool

HasPrefix checks if passed runes slice is a prefix of the haystack

func HasSuffix

func HasSuffix(haystack []rune, needle []rune) bool

HasPrefix checks if passed runes slice is a suffix of the haystack

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func BufferGet

func BufferGet(length int) *Buffer

BufferGet get from storage or create buffer

func NewBuffer

func NewBuffer(length int) *Buffer

func (*Buffer) Add

func (b *Buffer) Add(data []rune) int

func (*Buffer) AddWithSpace

func (b *Buffer) AddWithSpace(data []rune, space int) int

func (*Buffer) Append

func (b *Buffer) Append(id int, data []rune)

func (*Buffer) Copy

func (b *Buffer) Copy(id int) int

func (*Buffer) Get

func (b *Buffer) Get(id int) []rune

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL