strings

package
v2.147.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(s string) []byte

Bytes from string.

func Concat

func Concat(ss ...string) string

Concat will take all the strings and join them with an empty string.

func Contains

func Contains(s, substr string) bool

Contains is an alias for strings.Contains.

func Cut

func Cut(s, sep string) (string, string, bool)

Cut is an alias for strings.Cut.

func CutColon added in v2.12.0

func CutColon(s string) (string, string)

CutColon will split by : and give before and after.

func HasPrefix

func HasPrefix(s, prefix string) bool

HasPrefix is an alias for strings.HasPrefix.

func IsAnyEmpty added in v2.24.0

func IsAnyEmpty(ss ...string) bool

IsAnyEmpty checks if any strings are empty.

func IsEmpty

func IsEmpty(s string) bool

IsEmpty checks if a string is empty.

func Join

func Join(sep string, ss ...string) string

Join strings by a separator. This allows to do strings.Join(" ", "1", "2").

func Repeat

func Repeat(s string, count int) string

Repeat is an alias for strings.Repeat.

func ReplaceAll added in v2.93.0

func ReplaceAll(s, o, n string) string

ReplaceAll is an alias for strings.ReplaceAll.

func ToLower

func ToLower(s string) string

ToLower is an alias for strings.ToLower.

func TrimSpace

func TrimSpace(s string) string

TrimSpace is an alias for strings.TrimSpace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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