utils

package
v0.0.0-...-9648343 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AZ_09

func AZ_09(s string) bool

AZ_09 checks if all characters in a string are [a-zA-Z0-9_]

func AddPrefix

func AddPrefix(s, pfx string) string

AddPrefix adds pfx at the start of s, if s does not already start with pfx.

func Arg

func Arg(s []string, i int) string

Arg safely returns index i of a string array.

func Elapsed

func Elapsed(t time.Duration) string

Elapsed returns a human-readable duration string where readability is more important than being precise.

func IsSmallUnum

func IsSmallUnum(s string) bool

IsSmallUnum returns whether is a small unsigned integer.

func IsUnsigned

func IsUnsigned(s string) bool

func LoginArg

func LoginArg(arg string) string

func NoBing

func NoBing(s string) string

func Nonce

func Nonce() string

func OwnAddress

func OwnAddress() string

OwnAddress attempts to determine a local address used for internal communication. Should probably be replaced with "ip route get" for the relevant remote party.

func TrimRight

func TrimRight(s string) string

TrimRight removes characters that are commonly used to bypass Twitch duplicate message detection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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