This method MUST not be used by programs, it is here for debugging only and can be removed without any notice.
TODO: rename to avoid blocking a good identifier like output
.
# Display self on stdout (debug only).
#
# This method MUST not be used by programs, it is here for debugging
# only and can be removed without any notice.
#
# TODO: rename to avoid blocking a good identifier like `output`.
fun output
do
'<'.output
object_id.output
'>'.output
end
lib/core/kernel.nit:175,2--186,4
redef fun output `{
if(self < 128){
printf("%c", self);
}else if(self < 2048){
printf("%c%c", 0xC0 | ((0x7C0 & self) >> 6), 0x80 | (0x3F & self));
}else if(self < 65536){
printf("%c%c%c", 0xE0 | ((0xF000 & self) >> 12), 0x80 | ((0xFC0 & self) >> 6) ,0x80 | (0x3F & self));
}else if(self < 2097152){
printf("%c%c%c%c", 0xF0 | ((0x1C0000 & self) >> 18), 0x80 | ((0x3F000 & self) >> 12), 0x80 | ((0xFC0 & self) >> 6), 0x80 | (0x3F & self));
}else{
// Bad char
printf("%c", self);
}
`}
lib/core/kernel.nit:896,2--909,3