rex

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandConvertWrite

func ExpandConvertWrite(source string, w io.Writer, re *regexp.Regexp, template string, match []int, convert Converter) (int, error)

func ExpandWrite

func ExpandWrite(source string, w io.Writer, re *regexp.Regexp, template string, match []int) (int, error)

func NoConvert

func NoConvert(n int, name string, value string) string

func ReplaceAllConvertString

func ReplaceAllConvertString(source string, re *regexp.Regexp, template string, convert Converter) string

func ReplaceAllConvertWrite

func ReplaceAllConvertWrite(source string, w io.Writer, re *regexp.Regexp, template string, convert Converter) (int, error)

func ReplaceAllString

func ReplaceAllString(source string, re *regexp.Regexp, template string) string

func ReplaceAllWrite

func ReplaceAllWrite(source string, w io.Writer, re *regexp.Regexp, template string) (int, error)

Types

type Converter

type Converter func(n int, name string, value string) string

Converter a convert function used by ExpandConvertWrite() `n` is the number of $0, $1, $2, ... `name` is the name of ${x}, $y, ... (n = -1 and name = "") means other unmatched text

Jump to

Keyboard shortcuts

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