stringslite

package standard library
go1.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation ΒΆ

Overview ΒΆ

Package stringslite implements a subset of strings, only using packages that may be imported by "os".

Tests for these functions are in the strings package.

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

func Clone ΒΆ

func Clone(s string) string

func Cut ΒΆ

func Cut(s, sep string) (before, after string, found bool)

func CutPrefix ΒΆ

func CutPrefix(s, prefix string) (after string, found bool)

func CutSuffix ΒΆ

func CutSuffix(s, suffix string) (before string, found bool)

func HasPrefix ΒΆ

func HasPrefix(s, prefix string) bool

func HasSuffix ΒΆ

func HasSuffix(s, suffix string) bool

func Index ΒΆ

func Index(s, substr string) int

func IndexByte ΒΆ

func IndexByte(s string, c byte) int

func TrimPrefix ΒΆ

func TrimPrefix(s, prefix string) string

func TrimSuffix ΒΆ

func TrimSuffix(s, suffix string) string

Types ΒΆ

This section is empty.

Jump to

Keyboard shortcuts

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