strings

package
v0.0.0-...-436d200 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Intern

func Intern(s string) string

func InternBytes

func InternBytes(b []byte) string

func ShallowString

func ShallowString(b []byte) (s string)

ShallowString force casts a []byte to a string. USE AT YOUR OWN RISK

Types

type InternStringPool

type InternStringPool struct {
	// contains filtered or unexported fields
}

InternStringPool is a simple thread-safe intern string pool.

func NewInternStringPool

func NewInternStringPool() *InternStringPool

NewInternStringPool returns a new instance of InternStringPool

func (*InternStringPool) Intern

func (p *InternStringPool) Intern(s string) string

func (*InternStringPool) InternBytes

func (p *InternStringPool) InternBytes(b []byte) string

Jump to

Keyboard shortcuts

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