encode

fun encode(charSequence: CharSequence): Long

Encodes the charSequence using base-37 encoding.

Return

the base-37 encoded long representation of the string.

Parameters

charSequence

the char sequence to encode. Valid characters include: a-z, A-Z, 0-9, _

Throws

if the charSequence is longer than 12 characters, or uses characters not listed in the valid characters list.