text

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeControlChars added in v0.0.25

func EscapeControlChars(content string) string

EscapeControlChars safely escapes control characters in the content to prevent terminal issues. For ASCII control chars (< 32), it replaces them with escape sequences like \r, \n, \t, etc. For non-ASCII control chars, it replaces them with U+xxxx representation. Newlines, tabs, and carriage returns are preserved as they're safe for terminal output.

func RenderLetter

func RenderLetter(l byte, opts TextOptions) []string

RenderLetter returns ASCII art lines for a single character Supports: A-Z, 0-9, space, and special characters: - _ + ( ) Returns 6 lines of ASCII art for the given character

func RenderText

func RenderText(text string, opts TextOptions) []string

RenderText renders text as large ASCII art by combining individual letters Supports: A-Z, 0-9, space, and special characters: - _ + ( )

Types

type TextOptions

type TextOptions struct {
	Width   int // Width of the text rendering area (for centering)
	Spacing int // Spacing between letters (default: 1)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL