Source File
runes.go
Belonging Package
charm.land/lipgloss/v2
package lipglossimport ()// StyleRunes apply a given style to runes at the given indices in the string.// Note that you must provide styling options for both matched and unmatched// runes. Indices out of bounds will be ignored.func ( string, []int, , Style) string {// Convert slice of indices to a map for easier lookups:= make(map[int]struct{})for , := range {[] = struct{}{}}var (strings.Builderstrings.BuilderStyle= []rune())for , := range {.WriteRune(), := [], := [+1]if != || == len()-1 {// Flushif {=} else {=}.WriteString(.Render(.String())).Reset()}}return .String()}
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64)