str

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type String

type String struct {
	V []byte
}

func NewString

func NewString() *String

func (*String) Append added in v1.6.0

func (s *String) Append(data []byte) int64

func (*String) BitCount added in v1.2.0

func (s *String) BitCount(start, end int64) int64

BitCount counts the number of bits set to 1

func (*String) BitCountByBit added in v1.6.0

func (s *String) BitCountByBit(start, end int64) int64

BitCountByBit counts the number of bits set to 1 by bit

func (*String) Decr added in v1.5.0

func (s *String) Decr(step int64) (int64, error)

Decr decrements the value by 1

func (*String) Get

func (s *String) Get() []byte

Get the value

func (*String) GetBit added in v1.2.0

func (s *String) GetBit(offset int64) int64

GetBit get a bit in a key

func (*String) GetRange added in v1.6.0

func (s *String) GetRange(start, end int64) []byte

GetRange returns the substring of the value

func (*String) GetSet added in v1.6.0

func (s *String) GetSet(v []byte) []byte

GetSet set the value and return the old value

func (*String) GetValue added in v1.2.0

func (s *String) GetValue() []byte

GetValue the string to bytes

func (*String) Incr added in v1.5.0

func (s *String) Incr(step int64) (int64, error)

Incr increments the value by 1

func (*String) IncrByFloat added in v1.6.0

func (s *String) IncrByFloat(step float64) (float64, error)

IncrByFloat increments the value by a float

func (*String) Set

func (s *String) Set(v []byte)

Set the value

func (*String) SetBit added in v1.2.0

func (s *String) SetBit(offset int64, value bool) int64

SetBit set a bit in a key

func (*String) SetRange added in v1.6.0

func (s *String) SetRange(offset int64, data []byte) int64

SetRange sets the value at the offset

func (*String) SetValue added in v1.2.0

func (s *String) SetValue(data []byte)

SetValue the bytes to string

func (*String) Strlen added in v1.6.0

func (s *String) Strlen() int64

Strlen returns the length of the value

func (*String) Type added in v1.2.0

func (s *String) Type() ds.ValueType

Type returns the type of the data structure

Jump to

Keyboard shortcuts

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