package lipgloss

import (
	
)

// 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.Builder
		 strings.Builder
		 Style
		 = []rune()
	)

	for ,  := range  {
		.WriteRune()

		,  := []
		,  := [+1]

		if  !=  ||  == len()-1 {
			// Flush
			if  {
				 = 
			} else {
				 = 
			}
			.WriteString(.Render(.String()))
			.Reset()
		}
	}

	return .String()
}