Documentation
¶
Overview ¶
Package stringutil provides advanced string manipulation functions, including ANSI scrubbing, credential masking, and random string generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamedGroupMatches ¶
NamedGroupMatches returns a map with all found named regex groups as keys and an array of all matches as the value and an array of all the keys in the order they were set in the regex (this is since the map keys order won't be predictable).
func ProcessParamsAndQuotes ¶
ProcessParamsAndQuotes takes in a slice of strings, and rearranges the slices depending on quotes and parenthesis.
For example "hello ", "wor(", "ld)" becomes "hello ", "wor( ld)".
func RandomAlphanumeric ¶
RandomAlphanumeric returns a random alphanumeric string of length n.
func ScrubANSICodes ¶
ScrubANSICodes removes ANSI escape codes from a string.
func ScrubCredentials ¶
ScrubCredentials removes credentials from a string.
func ScrubCredentialsAll ¶
ScrubCredentialsAll scrubs all credentials from a longer piece of text.
Types ¶
This section is empty.