libperun

Class std.text.TextCodec

Synopsis

public abstract class TextCodec

Represents an abstract text codec.

Fields

Constructors

Methods

public abstract byte_t[] encode(String str);

Encode the specified string using this encoding. Returns the corresponding array of bytes. The returned array should be NUL-terminated.

public abstract String decode(byte_t[] data);

Decode the specified string using this encoding. The specified array may or may not be NUL-terminated. Return the result as a Perun string.