Help us shape the future of Go! Take the 2026 Go Developer Survey

stringutil

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NeedsQuotes

func NeedsQuotes(s string) bool

NeedsQuotes reports whether s should be wrapped with quote before being used as an object 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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