text

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertCase

func ConvertCase(input string, to string) (string, error)

func Diff

func Diff(a, b string, contextLines int) string

func Escape

func Escape(input string, mode string) (string, error)

func RenderMarkdown

func RenderMarkdown(input []byte, toHTML bool, syntaxHighlight bool, theme string) ([]byte, error)

func Unescape

func Unescape(input string, mode string) (string, error)

Types

type TextInfo

type TextInfo struct {
	Characters int    `json:"characters"`
	Words      int    `json:"words"`
	Lines      int    `json:"lines"`
	Sentences  int    `json:"sentences"`
	Bytes      int    `json:"bytes"`
	BytesHuman string `json:"bytes_human"`
	IsASCII    bool   `json:"is_ascii"`
	HasUnicode bool   `json:"has_unicode"`
}

TextInfo holds analysis results for a text string.

func Inspect

func Inspect(input string) *TextInfo

Jump to

Keyboard shortcuts

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