Documentation ¶
Overview ¶
Package tr is similar to the Unix tr program. Originally based on the code in Software Tools by Kernighan and Plauger. Currently it is byte based - it does not handle unicode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptySet = Set("")
Functions ¶
func Replace ¶
Replace translates, squeezes, or deletes characters from the src string. If the first character of from is '^' then the from set is complemented. Ranges are specified with '-' between to characters. If the to set is empty, then characters in the from set are deleted. If the to set is shorter than the from set, then the last character in the to set is repeated to make the sets the same length, and this repeated character is never put more than once in a row in the output.
Types ¶
Click to show internal directories.
Click to hide internal directories.