stringslite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 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". It's only meant for use by packages in the standard library. Others should use the strings package instead.

Based on the internal/stringslite package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone(a mem.Allocator, s string) string

func Cut

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

func CutPrefix

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

func CutSuffix

func CutSuffix(s, suffix string) (string, 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