str

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 12 Imported by: 0

README

str

Go string class

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Str

type Str string

func New

func New(v any) Str

func (Str) Append

func (s Str) Append(values ...string) Str

func (Str) AppendRune

func (s Str) AppendRune(values ...rune) Str

func (Str) At

func (s Str) At(index int) Str

func (Str) Clone

func (s Str) Clone() Str

func (Str) Compare

func (s Str) Compare(value string) int

func (Str) Contains

func (s Str) Contains(values ...string) bool

func (Str) ContainsAny

func (s Str) ContainsAny(chars string) bool

func (Str) Count

func (s Str) Count(search string) int

func (Str) Cut

func (s Str) Cut(search string) (before, after string, found bool)

func (Str) CutPrefix

func (s Str) CutPrefix(prefix string) (string, bool)

func (Str) CutSuffix

func (s Str) CutSuffix(suffix string) (string, bool)

func (Str) Fields

func (s Str) Fields() []string

func (Str) FieldsFunc

func (s Str) FieldsFunc(fn func(rune) bool) []string

func (Str) Find

func (s Str) Find(pattern string) string

func (Str) FindAll

func (s Str) FindAll(pattern string) []string

func (Str) FindAllIndex

func (s Str) FindAllIndex(pattern string) [][]int

func (Str) FindIndex

func (s Str) FindIndex(pattern string) []int

func (Str) HasPrefix

func (s Str) HasPrefix(prefixes ...string) bool

func (Str) HasSuffix

func (s Str) HasSuffix(suffixes ...string) bool

func (Str) In

func (s Str) In(values ...string) bool

func (Str) Index

func (s Str) Index(search string) int

func (Str) IndexAny

func (s Str) IndexAny(chars string) int

func (Str) Join

func (s Str) Join(values []string) Str

func (Str) LastIndex

func (s Str) LastIndex(search string) int

func (Str) LastIndexAny

func (s Str) LastIndexAny(chars string) int

func (Str) Len

func (s Str) Len() int

func (Str) Map

func (s Str) Map(fn func(rune) rune) Str

func (Str) MarshalBinary

func (s Str) MarshalBinary() ([]byte, error)

func (Str) MarshalJSON

func (s Str) MarshalJSON() ([]byte, error)

func (Str) MarshalText

func (s Str) MarshalText() ([]byte, error)

func (Str) Match

func (s Str) Match(pattern string) bool

func (Str) MatchRegex

func (s Str) MatchRegex(re *regexp.Regexp) bool

func (Str) PadEnd

func (s Str) PadEnd(length int, pad string) Str

func (Str) PadStart

func (s Str) PadStart(length int, pad string) Str

func (Str) ParseFloat

func (s Str) ParseFloat() (float64, error)

func (Str) ParseInt

func (s Str) ParseInt() (int64, error)

func (Str) ParseUint

func (s Str) ParseUint() (uint64, error)

func (Str) PopEnd

func (s Str) PopEnd() (rune, Str)

func (Str) PopStart

func (s Str) PopStart() (rune, Str)

func (Str) Prepend

func (s Str) Prepend(values ...string) Str

func (Str) PrependRune

func (s Str) PrependRune(values ...rune) Str

func (Str) Reader

func (s Str) Reader() *strings.Reader

func (Str) Repeat

func (s Str) Repeat(count int) Str

func (Str) Replace

func (s Str) Replace(old, new string, n int) Str

func (Str) ReplaceAll

func (s Str) ReplaceAll(old, new string) Str

func (Str) ReplaceEach

func (s Str) ReplaceEach(old, new string) Str

func (Str) ReplaceLast

func (s Str) ReplaceLast(old, new string) Str

func (Str) ReplacePattern

func (s Str) ReplacePattern(pattern, new string) Str

func (Str) ReplaceRegex

func (s Str) ReplaceRegex(regex *regexp.Regexp, new string) Str

func (Str) RuneAt

func (s Str) RuneAt(index int) Str

func (Str) RuneCount

func (s Str) RuneCount() int

func (Str) RuneIndex

func (s Str) RuneIndex(r rune) int

func (Str) Slice

func (s Str) Slice(start, end int) Str

func (Str) SliceFrom

func (s Str) SliceFrom(index int) Str

func (Str) SliceRunes

func (s Str) SliceRunes(start, end int) Str

func (Str) SliceRunesFrom

func (s Str) SliceRunesFrom(index int) Str

func (Str) SliceRunesTo

func (s Str) SliceRunesTo(index int) Str

func (Str) SliceTo

func (s Str) SliceTo(index int) Str

func (Str) Split

func (s Str) Split(delim string) []string

func (Str) SplitN

func (s Str) SplitN(delim string, count int) []string

func (Str) SplitPattern

func (s Str) SplitPattern(pattern string) []string

func (Str) SplitRegex

func (s Str) SplitRegex(regex *regexp.Regexp) []string

func (Str) String

func (s Str) String() string

func (Str) ToCamel

func (s Str) ToCamel() Str

func (Str) ToGoCamel

func (s Str) ToGoCamel() Str

func (Str) ToGoPascal

func (s Str) ToGoPascal() Str

func (Str) ToKebab

func (s Str) ToKebab() Str

func (Str) ToLower

func (s Str) ToLower() Str

func (Str) ToPascal

func (s Str) ToPascal() Str

func (Str) ToSnake

func (s Str) ToSnake() Str

func (Str) ToUpper

func (s Str) ToUpper() Str

func (Str) ToUpperSnake

func (s Str) ToUpperSnake() Str

func (Str) Trim

func (s Str) Trim() Str

func (Str) TrimFunc

func (s Str) TrimFunc(fn func(rune) bool) Str

func (Str) TrimPrefix

func (s Str) TrimPrefix(prefix string) Str

func (Str) TrimSuffix

func (s Str) TrimSuffix(suffix string) Str

func (Str) TrimValue

func (s Str) TrimValue(value string) Str

func (*Str) UnmarshalBinary

func (s *Str) UnmarshalBinary(v []byte) error

func (*Str) UnmarshalJSON

func (s *Str) UnmarshalJSON(v []byte) error

func (*Str) UnmarshalText

func (s *Str) UnmarshalText(v []byte) error

Jump to

Keyboard shortcuts

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