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

Link copied to clipboard
abstract val size: Int

Number of characters in the alphabet.

Functions

Link copied to clipboard
abstract operator fun get(index: Int): Char

Returns the character at index in the alphabet.

Link copied to clipboard
abstract fun indexOf(c: Char): Int

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

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.

size

abstract val size: Int(source)

Number of characters in the alphabet.