util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

package util contains verious utilities utilized for rx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToValue

func StringToValue(s string) interface{}

StringToValue attempts to convert the given string into a value. This supports booleans, integers, and floats. The following values are considered booleans, case-insensitive: true, yes, false, no.

Integer radix is inferred by prefix, supporting 0b, 0o, or 0x (per strconv.ParseInt()).

func Unescape

func Unescape(s string) (string, error)

Unescapes escapes escape codes. I spent at least 15 minutes googling how to do this and couldn't find anything that does, or even anyone else who wanted to do this. I find this pretty shocking and I'm sure there's a better version of this out there somewhere. I also tried using Sprintf(), and that didn't work either.

This unescapes the following sequences: \a, \b, \e, \f, \n, \r, \t, \v, \\, \', and \"

Types

This section is empty.

Jump to

Keyboard shortcuts

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