Files
fn_registry/functions/tui/draw_separator.go
T
egutierrez ebba1e4e02 feat: add Go TUI rendering and terminal helper functions
7 funciones Go del dominio tui: apply_gradient (gradiente de color en texto),
draw_box y draw_separator (renderizado de cajas y separadores con box_chars),
load_ascii_art (carga de arte ASCII desde archivos), normalize_terminal_output
y strip_ansi (limpieza de salida de terminal), read_dir_autocomplete
(autocompletado de rutas de directorio). Incluye box_chars.go como helper
de caracteres Unicode para bordes.
2026-04-12 13:54:54 +02:00

14 lines
372 B
Go

package tui
import "github.com/charmbracelet/lipgloss"
// DrawSeparator draws a horizontal separator line of the given width.
func DrawSeparator(width int, style lipgloss.Style, sepChar string) string {
if sepChar == "" {
sepChar = BoxSep
}
return style.Render(
lipgloss.PlaceHorizontal(width, lipgloss.Left, sepChar, lipgloss.WithWhitespaceChars(sepChar)),
)
}