Module

x/polkadot/util/u8a/index.ts>u8aCmp

Package publishing for deno.land/x/polkadot
Go to Latest
function u8aCmp
import { u8aCmp } from "https://dotland.deno.dev/x/polkadot@0.2.35/util/u8a/index.ts";

Examples

import { u8aCmp } from 'https://deno.land/x/polkadot@0.2.35/util/mod.ts';

u8aCmp(new Uint8Array([0x67, 0x65]), new Uint8Array([0x68, 0x65])); // -1
u8aCmp(new Uint8Array([0x68, 0x65]), new Uint8Array([0x68, 0x65])); // 0
u8aCmp(new Uint8Array([0x69, 0x65]), new Uint8Array([0x68, 0x65])); // +1

Parameters

a: HexString | Uint8Array | string
b: HexString | Uint8Array | string

Returns

number