function

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package function contains example functions that can be used in QFrame.Apply and QFrame.Eval.

Index

Constants

This section is empty.

Variables

View Source
var LowerS = nilSafe(strings.ToLower)

LowerS returns the lower case representation of s.

View Source
var UpperS = nilSafe(strings.ToUpper)

UpperS returns the upper case representation of s.

Functions

func AbsI

func AbsI(x int) int

AbsI returns the absolute value of x.

func AndB

func AndB(x, y bool) bool

AndB returns the logical conjunction of x and y.

func BoolI

func BoolI(x int) bool

BoolI returns bool representation of x. x == 0 => false, all other values result in true.

func ConcatS

func ConcatS(x, y *string) *string

ConcatS returns the concatenation of x and y.

func DivF

func DivF(x, y float64) float64

DivF returns x / y. y == 0 will cause panic.

func DivI

func DivI(x, y int) int

DivI returns x / y. y == 0 will cause panic.

func FloatI

func FloatI(x int) float64

FloatI casts x to float.

func IntB

func IntB(x bool) int

IntB casts x to int. true => 1 and false => 0.

func IntF

func IntF(x float64) int

IntF casts x to int.

func LenS

func LenS(s *string) int

LenS returns the length of s.

func MinusF

func MinusF(x, y float64) float64

MinusF returns x - y.

func MinusI

func MinusI(x, y int) int

MinusI returns x - y.

func MulF

func MulF(x, y float64) float64

MulF returns x * y.

func MulI

func MulI(x, y int) int

MulI returns x * y.

func NandB

func NandB(x, y bool) bool

NandB returns the inverse logical conjunction of x and b.

func NotB

func NotB(x bool) bool

NotB returns the inverse of x

func OrB

func OrB(x, y bool) bool

OrB returns the logical disjunction of x and y.

func PlusF

func PlusF(x, y float64) float64

PlusF returns x + y.

func PlusI

func PlusI(x, y int) int

PlusI returns x + y.

func StrB

func StrB(x bool) *string

StrB returns the string representation of x.

func StrF

func StrF(x float64) *string

StrF returns the string representation of x.

func StrI

func StrI(x int) *string

StrI returns the string representation of x.

func StrS

func StrS(s *string) *string

StrS returns s.

This may appear useless but this can be used to convert enum columns to string columns so that the two can be used as input to other functions. It is currently not possible to combine enum and string as input.

func XorB

func XorB(x, y bool) bool

XorB returns the exclusive disjunction of x and y

Types

This section is empty.

Jump to

Keyboard shortcuts

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