Standard libraryinternal/stringslite Index | Files

package stringslite

import "internal/stringslite"

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

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

Source Files

strings.go

Version
v1.23.4
Published
Nov 27, 2024
Platform
js/wasm
Imports
2 packages
Last checked
54 seconds ago

Tools for package owners.