Documentation ¶
Overview ¶
Package replacer ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Replacer ¶
Replacer represents a string replacement operation.
func (Replacer) Replace ¶
Replace replaces strings in the Source slice with corresponding strings from the Replacements slice. It returns a new slice with the replaced strings, while leaving the original Source slice unchanged. The replacement is performed by iterating over the Source slice and checking if each element has a match in the Replacements slice. If a match is found, the corresponding element from the Replacements slice is used as the replacement.
Click to show internal directories.
Click to hide internal directories.