Documentation | SupportKit
from HaikuR1.SupportKit import int_to_code, code_to_int
Acts as the entry point for the classes and submodules in the Support Kit. Also contains two utility functions.
These utility functions are not part of the Haiku R1 API; they are for convenience. The built-in type codes and message constants are 32-bit integers whose individual bytes are equivalent to ASCII characters; this makes it easy to print the bytes of a constant directly to the console when writing code in C++.
However, it's not as easy with interpreted languages, so these functions map between the integer values and the 4-character strings.
use HaikuR1::SupportKit qw(:util)
Python does not support export tags.
Converts an integer type to a string code.
my $code = int_to_code($type);
code = int_to_code(type)
An integer to be converted into a string.
Converts a string code to an integer type.
my $type= code_to_int($code);
A string to be converted into an integer.