runes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TabWidth = 4

Functions

func Aggregate

func Aggregate(candicate [][]rune) (same []rune, size int)

func Backspace

func Backspace(r []rune) []byte

func ColorFilter

func ColorFilter(r []rune) []rune

func Copy

func Copy(r []rune) []rune

func Equal

func Equal(a, b []rune) bool

func EqualFold

func EqualFold(a, b []rune) bool

func EqualRune

func EqualRune(a, b rune, fold bool) bool

func EqualRuneFold

func EqualRuneFold(a, b rune) bool

func HasPrefix

func HasPrefix(r, prefix []rune) bool

func HasPrefixFold

func HasPrefixFold(r, prefix []rune) bool

func Index

func Index(r rune, rs []rune) int

func IndexAll

func IndexAll(r, sub []rune) int

Search in runes from front to end

func IndexAllBck

func IndexAllBck(r, sub []rune) int

Search in runes from end to front

func IndexAllBckEx

func IndexAllBckEx(r, sub []rune, fold bool) int

func IndexAllEx

func IndexAllEx(r, sub []rune, fold bool) int

func IsWordBreak

func IsWordBreak(i rune) bool

func SplitByLine

func SplitByLine(prompt, rs []rune, offset, screenWidth, nextWidth int) [][]rune

split prompt + runes into lines by screenwidth starting from an offset. the prompt should be filtered before passing to only its display runes. if you know the width of the next character, pass it in as it is used to decide if we generate an extra empty rune array to show next is new line.

func TrimSpaceLeft

func TrimSpaceLeft(in []rune) []rune

func Width

func Width(r rune) int

func WidthAll

func WidthAll(r []rune) (length int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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