Documentation ¶
Overview ¶
Package textutil provide some extra text handle util
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VarReplacer ¶
type VarReplacer struct {
Left, Right string
// contains filtered or unexported fields
}
VarReplacer struct
func (*VarReplacer) Replace ¶
func (r *VarReplacer) Replace(s string, tplVars map[string]any) string
Replace vars in the text contents
func (*VarReplacer) WithFormat ¶
func (r *VarReplacer) WithFormat(format string) *VarReplacer
WithFormat custom var template
Click to show internal directories.
Click to hide internal directories.