Skip to main content

b62_decode

Decodes a base-62 encoded string into its corresponding integer representation, supporting an optional leading negative sign.

def b62_decode(
s: str
) - > int

Decodes a base-62 encoded string into its corresponding integer representation.

Parameters

NameTypeDescription
sstrThe base-62 encoded string to be converted, which may include a leading hyphen for negative values.

Returns

TypeDescription
intThe decoded integer value, preserving the sign if the input string was prefixed with a hyphen.