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

strings

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Quote added in v0.18.1

func Quote(s string) string

Quote returns a json quoted string with escape characters. The implementation is taken from TiDB: https://github.com/pingcap/tidb/blob/a594287e9f402037b06930026906547000006bb6/types/json/binary_functions.go#L155

func Unquote

func Unquote(s string) (string, error)

Unquote returns a json unquoted string. The implementation is taken from TiDB https://github.com/pingcap/tidb/blob/a594287e9f402037b06930026906547000006bb6/types/json/binary_functions.go#L89

func UnquoteBytes added in v0.20.0

func UnquoteBytes(b []byte) ([]byte, error)

UnquoteBytes is the same as Unquote, except it modifies a byte slice in-place Be careful: by reusing the slice, this destroys the original input value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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