strings

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package strings provides a couple functions for strings, as an extension on the standard library's strings package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsCode

func AsCode(s string) string

AsCode returns the given string as code, correctly escaped

func EscapeBackticks

func EscapeBackticks(s string) string

EscapeBackticks escapes backticks in strings

func HasAnyPrefix

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

HasAnyPrefix checks if the string has *any* of the given prefixes

func HasAnySuffix

func HasAnySuffix(s string, suffixes ...string) bool

HasAnySuffix checks if the string has *any* of the given suffixes

func TrimPrefixesSpace

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

TrimPrefixesSpace trims all given prefixes as well as whitespace from the given string

Types

This section is empty.

Jump to

Keyboard shortcuts

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