# bn_cmp

## NAME

**bn_cmp** - takes two named arguments key1, key2. Returns 0 when they're equal, -1 when key1 > key2, +1 when key2 > key1

## SYNOPSIS

*str* **bn_cmp**(key: str, buf: str);

**bn_cmp** It takes two named arguments key1, key2. Returns 0 when they're equal, -1 when key1 > key2, +1 when key2 > key1.

## DESCRIPTION

Compares key1 with key2.

## RETURN VALUE

0 when key and key2 are equal, -1 when key1 > key2 and +1 when key1 < key2.

## SEE ALSO

**[bn_random(3)](bn_random.md)**,
