fn compare(a: anytype, op: CompareOperator, b: anytype) bool

This function does the same thing as comparison operators, however the operator is a runtime-known enum value. Works on any operands that support comparison operators.

Parameters

a: anytype,
b: anytype,