strings

package
v0.0.0-...-e3e47e0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cut

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

Cut slices s around the first instance of sep, returning the text before and after sep. The found result reports whether sep appears in s. If sep does not appear in s, cut returns s, "", false.

func FindChar

func FindChar(s string, c byte) int

TODO(anton2920): rewrite using SIMD.

func FindCharReverse

func FindCharReverse(s string, c byte) int

TODO(anton2920): rewrite using (DF=1 and REP SCASB) or SIMD.

func FindSubstring

func FindSubstring(a, b string) int

TODO(anton2920): rewrite using SIMD.

func LengthInRange

func LengthInRange(s string, min, max int) bool

func Or

func Or(vs ...string) string

func StartsWith

func StartsWith(s, prefix string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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