Package text

Package text owns platform-neutral text editing and shaping contracts.

Import path: import "github.com/vivaui/viva/text"

Package text owns platform-neutral text editing and shaping contracts.

Types

Functions

SingleLine#

func SingleLine(value string) string

SingleLine folds pasted lines and tabs into spaces and drops other control characters. Printable Unicode and spaces within each line are preserved. Text that already fits one line is returned as it is, so typing costs no allocation.