14 lines
274 B
Plaintext
14 lines
274 B
Plaintext
ns std::core
|
|
|
|
use std::text::Encoding
|
|
|
|
pub int Character : Display {
|
|
bytes: Array<Byte>
|
|
encoding: string::Encoding
|
|
}
|
|
|
|
pub impl Utf8Character(bytes: Array<Byte>) {
|
|
impl fn get_encoding() = Encoding::Utf8
|
|
impl fn to_string() = string::from_utf8_bytes(bytes)
|
|
}
|