kencode

Alphabet

interface Alphabet(source)

Maps indices to characters (encoding) and characters back to indices (decoding). indexOf returns -1 for characters not in the alphabet.

Inheritors

Properties

size

abstract val size: Int(source)

Number of characters in the alphabet.

Functions

get

abstract operator fun get(index: Int): Char(source)

Returns the character at index in the alphabet.

indexOf

abstract fun indexOf(c: Char): Int(source)

Returns the index of c in the alphabet, or -1 if c is not present.