(38 lines)
1 '\" t2 .\" Copyright (c) 2026 Bruce Hill3 .\" All rights reserved.4 .\"5 .TH Int.hex 3 2026-01-19 "Tomo man-pages"6 .SH NAME7 Int.hex \- convert to hexidecimal8 .SH LIBRARY9 Tomo Standard Library10 .SH SYNOPSIS11 .nf12 .BI Int.hex\ :\ func(i:\ Int,\ digits:\ Int\ =\ 0,\ uppercase:\ Bool\ =\ yes,\ prefix:\ Bool\ =\ yes\ ->\ Text)13 .fi14 .SH DESCRIPTION15 Converts an integer to its hexadecimal representation.18 .SH ARGUMENTS20 .TS21 allbox;22 lb lb lbx lb23 l l l l.24 Name Type Description Default25 i Int The integer to be converted. -26 digits Int The minimum number of digits in the output string. 027 uppercase Bool Whether to use uppercase letters for hexadecimal digits. yes28 prefix Bool Whether to include a "0x" prefix. yes29 .TE30 .SH RETURN31 The hexadecimal string representation of the integer.33 .SH EXAMPLES34 .EX35 assert 255.hex(digits=4, uppercase=yes, prefix=yes) == "0x00FF"36 .EE37 .SH SEE ALSO38 .BR Tomo-Int (3)