stringsx

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPrefix

func HasPrefix(s string, prefixes ...string) bool

HasPrefix checks if the given string s has any prefix from the provided list of prefixes. It returns true if any prefix matches the start of s, otherwise returns false.

func LowerFirstChar

func LowerFirstChar(s string) string

LowerFirstChar takes a string and returns a new string with the first character converted to lowercase.

func OneOf

func OneOf(s string, ss ...string) bool

OneOf checks if a given string s is present within a slice of strings ss.

func TrimFirstPrefix

func TrimFirstPrefix(s string, prefixes ...string) string

TrimFirstPrefix removes the first matching prefix from the string `s` found in the list `prefixes`. If no non-empty prefix is found, it returns the original string unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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