stringutils

package
v0.0.0-...-fb80b42 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s string, substrings ...string) (bool, bool, map[string]int)

Contains if s contains any of the substrings, all of the substrings, and index of their occurrences

func Gsub

func Gsub(orig string, match, replacer interface{}) string

Gsub like ruby gsub, match can be string or *regexp.Regexp, replacer can be map (hash in ruby) or string the string match can have "|", then the conditional sub strings can be replaced by the value specified in replacer map and the replacer string can refer to matched target in match regexp via "\1" or "\2"

Types

This section is empty.

Jump to

Keyboard shortcuts

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