[][src]Module rule::op

Structs

Op

The Operator type, mainly contains a function pointer.

Functions

abs

Computes the absolute value of arg[0].

add
and
div
endswith

Return true if args[0] ends with args[1]

eq
ge
gt
in

Return true if args[0] in args[1..]. e.g. rule json string: ["in", 1, 1, 2, 3]

join

Concatenate strings with a seperator.

le
lower

Convert upper case letters to lower case.

lt

lt is equivalent to the < sign, args[0] and args[1] must be the same type.

match

Match string using an Unix shell style pattern.

mul
ne
neg
not
num

Convert a string into a number.

or
regex

Match strings using regular expressions.

rem

The remainder operator %. Aliases: %, rem, mod

split

Split strings using a seperator.

startswith

Return true if args[0] starts with args[1]

string

Convert a number into a string.

sub
upper

Convert lower case letters to upper case.

var

just a placeholder, will not be called

Type Definitions

Func