xstrings

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveFmtUnderscore

func RemoveFmtUnderscore(in string) (out string)

RemoveFmtUnderscore remove underscore in format placeholder {abc_def_} => {abcdef}

func RemoveJsoncComments

func RemoveJsoncComments(data []byte) []byte

RemoveJsoncComments remove json comments

func ValueOrDefault

func ValueOrDefault(try, default_ string) string

ValueOrDefault returns the value if it is not empty, otherwise the default value

func VariableReplace

func VariableReplace(s, delimiterLeft, delimiterRight string, dict map[string]string) string

VariableReplace Replace vairable placeholder like $(a.b.c) to value using map

func VariableReplaceFunc

func VariableReplaceFunc(s, delimiterLeft, delimiterRight string, dictFunc func(string) *string) *string

VariableReplaceFunc Replace vairable placeholder like $(a.b.c) to value using map function

Types

This section is empty.

Jump to

Keyboard shortcuts

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