ADDED:
* `stringsx` package
** `stringsx.Indent()`, to indent/prefix multiline strings
** `stringsx.Redact()`, to mask strings
** `stringsx.TrimLines()`, like strings.TrimSpace() but multiline
** `stringsx.TrimSpaceLeft()`, like strings.TrimSpace() but only to the
left of a string.
** `stringsx.TrimSpaceRight()`, like strings.TrimSpace() but only to the
right of a string.
12 lines
263 B
Go
12 lines
263 B
Go
package stringsx
|
|
|
|
const (
|
|
// DefMaskStr is the string used as the default maskStr if left empty in [Redact].
|
|
DefMaskStr string = "***"
|
|
)
|
|
|
|
const (
|
|
// DefIndentStr is the string used as the default indent if left empty in [Indent].
|
|
DefIndentStr string = "\t"
|
|
)
|