string

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDigit

func IsDigit(b byte) bool

func IsNumericArray

func IsNumericArray(src []byte) bool

func LowerCase

func LowerCase(src []byte)

Types

type String

type String struct {
	// Data here is analogous to the C string
	Data unsafe.Pointer
	Len  int
	// contains filtered or unexported fields
}

func New

func New() String

func NewWith

func NewWith(data []byte) String

func (*String) Bytes

func (c *String) Bytes() []byte

func (String) Capitalize

func (c String) Capitalize()

Capitalize returns a capitalized version of the string

func (String) CharAt

func (c String) CharAt(index int) byte

func (String) Compare

func (c String) Compare(b String) int

String returns native implementation of string value

func (String) Contains

func (c String) Contains(subStr []byte) bool

func (*String) CountByte

func (c *String) CountByte(b byte) int

func (String) HasPrefix

func (c String) HasPrefix(prefix []byte) bool

HasPrefix tests whether the string s begins with prefix.

func (String) HasSuffix

func (c String) HasSuffix(suffix string) bool

HasSuffix tests whether the string s ends with suffix.

func (String) IsEmpty

func (c String) IsEmpty() bool

IsEmpty returns whether the string is empty or not

func (String) IsHexadecimal

func (c String) IsHexadecimal() bool

is numeric checks whether given string is numeric or not

func (String) IsNumeric

func (c String) IsNumeric() bool

is numeric checks whether given string is numeric or not

func (String) IsOctal

func (c String) IsOctal() bool

func (*String) LastIndex

func (c *String) LastIndex(item []byte) int

LastIndex returns the index of the last instance of substr in s, or -1 if substr is not present in s.

func (*String) LastIndexOfByte

func (c *String) LastIndexOfByte(b byte) int

return the index of first matching byte

func (String) Length

func (c String) Length() int

Length returns the length of the string

func (String) LowerCase

func (c String) LowerCase()

LowerCase returns a lowercase version of the string

func (*String) Reverse

func (c *String) Reverse()

func (*String) String

func (c *String) String() string

String returns native implementation of string value

func (String) TitleCase

func (c String) TitleCase()

func (String) UpperCase

func (c String) UpperCase()

UpperCase returns an uppercase version of the string

Jump to

Keyboard shortcuts

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