stringutil

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(format string, a ...interface{}) error

Errorf calls fmt.Errorf. During wasm builds it is replaced by a custom version.

func Fprintf

func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)

Fprintf calls fmt.Fprintf. During wasm builds it is replaced by a custom version.

func NeedsQuotes

func NeedsQuotes(s string) bool

NeedsQuotes reports whether s should be wrapped with quote before being used as a document key. If it returns true, s must be used with strconv.Quote or using the fmt '%q' formatter.

func NormalizeIdentifier

func NormalizeIdentifier(s string, with rune) string

NormalizeIdentifier wraps s around the given quotes, if needed.

func Sprintf

func Sprintf(format string, a ...interface{}) string

Sprintf calls fmt.Sprintf. During wasm builds it is replaced by a custom version.

Types

type Stringer

type Stringer interface {
	String() string
}

Jump to

Keyboard shortcuts

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