stringHelpers

package
v1.2.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrToString

func ArrToString(strArray []string) string

ArrToString converts an array of strings to a printable string

func DBracket

func DBracket(s string) string

DBracket wraps the string in double brackets - [[]]

func DChevrons

func DChevrons(s string) string

DChevrons wraps the string in double chevrons - <<>>

func DCurlies

func DCurlies(s string) string

DCurlies wraps the string in double curlies - {{}}

func DParentheses

func DParentheses(s string) string

DParentheses wraps the string in double Parentheses - (())

func DQuote

func DQuote(s string) string

DQuote wraps the string in double quotes - ""

func Encode

func Encode(rawStr string) string

Encode encodes a string to base64

func LowerFirst

func LowerFirst(s string) string

Lowers the first character of a string

func MakeStringDisplayable

func MakeStringDisplayable(in string) string

The function "MakeStringDisplayable" takes a string as input and returns a modified version of the string that is displayable. Replaces {{cr}}/{{lf}} with ascii cr/lf.

func MakeStringStorable

func MakeStringStorable(in string) string

The function "MakeStringStorable" takes a string as input and returns a storable version of the string. Replaces ascii cr/lf with {{cr}}/{{lf}}.

func PadLeft

func PadLeft(s string, p string, l int) string

PadLeft pads a string on the left

func PadRight

func PadRight(s string, p string, l int) string

PadRight pads a string on the right

func RemoveSpecialChars

func RemoveSpecialChars(in string) string

RemoveSpecialChars removes special characters from a string and replaces them with a dash

func ReplaceWildcard

func ReplaceWildcard(orig string, replaceThis string, withThis string) string

ReplaceWildcard replaces a wildcard {{wildcard}} with a given string

func SBracket

func SBracket(s string) string

SBracket wraps the string in square brackets - []

func SChevrons

func SChevrons(s string) string

SChevrons wraps the string in single chevrons - <>

func SCurlies

func SCurlies(s string) string

SCurlies wraps the string in single curlies - {}

func SParentheses

func SParentheses(s string) string

SParentheses wraps the string in single Parentheses - ()

func SQuote

func SQuote(s string) string

SQuote wraps the string in single quotes - ”

func StrArrayToString

func StrArrayToString(inArray []string) string

StrArrayToString converst a string array into a string

func StrArrayToStringWithSep

func StrArrayToStringWithSep(inArray []string, inSep string) string

StrArrayToStringWithSep converts a string array to a string using a given separator

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL