utils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

IntervalRegex defines the compiled interval RegEx

Functions

func CreateHaste

func CreateHaste(content string) (string, error)

CreateHaste creates a haste and returns the URL

func EvaluateMathematicalExpression added in v1.1.0

func EvaluateMathematicalExpression(expression string) (string, error)

EvaluateMathematicalExpression evaluates the given expression and returns the result

func GenerateFromInterval added in v1.1.0

func GenerateFromInterval(raw string) (bool, int)

GenerateFromInterval generates a random number using the given interval

func PrettifyBool

func PrettifyBool(value bool) string

PrettifyBool prettifies a boolean

func RenderLaTeX added in v1.1.0

func RenderLaTeX(expression string) (string, error)

RenderLaTeX renders a LaTeX expression and returns the image URL

func StringArrayContains

func StringArrayContains(array []string, element string) bool

StringArrayContains checks whether or not an array of strings contains the given element

func StringHasPrefix

func StringHasPrefix(str string, prefixes []string, replace bool) (string, bool)

StringHasPrefix checks whether or not the given string starts with at least one element of the given array

func StringHasSuffix

func StringHasSuffix(str string, suffixes []string, replace bool) (string, bool)

StringHasSuffix checks whether or not the given string ends with at least one element of the given array

Types

This section is empty.

Jump to

Keyboard shortcuts

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