valueOf static method

int valueOf(
  1. int charCode
)

Value (0..31) for charCode, or -1 if it isn't a valid Bech32 character.

Implementation

static int valueOf(int charCode) =>
    charCode < reverseCharset.length ? reverseCharset[charCode] : -1;