Documentation
¶
Overview ¶
Package runeutil provides a utility function for use in Bubbles that can process Key messages containing runes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(sanitizer) sanitizer
Option is the type of option that can be passed to Sanitize().
func ReplaceNewlines ¶
ReplaceNewlines replaces newline characters by the specified string.
func ReplaceTabs ¶
ReplaceTabs replaces tabs by the specified string.
type Sanitizer ¶
type Sanitizer interface {
// Sanitize removes control characters from runes in a KeyRunes
// message, and optionally replaces newline/carriage return/tabs by a
// specified character.
//
// The rune array is modified in-place if possible. In that case, the
// returned slice is the original slice shortened after the control
// characters have been removed/translated.
Sanitize(runes []rune) []rune
}
Sanitizer is a helper for bubble widgets that want to process Runes from input key messages.
func NewSanitizer ¶
NewSanitizer constructs a rune sanitizer.
Click to show internal directories.
Click to hide internal directories.