blob: 9223478e8883e3f4a4a6ce711d7863e51b4540a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Int.hex 3 2025-04-19T14:52:07.132991 "Tomo man-pages"
.SH NAME
Int.hex \- Converts an integer to its hexadecimal representation.
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Int.hex\ :\ func(i:\ Int,\ digits:\ Int\ =\ 0,\ uppercase:\ Bool\ =\ yes,\ prefix:\ Bool\ =\ yes\ ->\ Text)
.fi
.SH DESCRIPTION
Converts an integer to its hexadecimal representation.
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
i Int The integer to be converted. -
digits Int The minimum number of digits in the output string. 0
uppercase Bool Whether to use uppercase letters for hexadecimal digits. yes
prefix Bool Whether to include a "0x" prefix. yes
.TE
.SH RETURN
The hexadecimal string representation of the integer.
.SH EXAMPLES
.EX
>> (255).hex(digits=4, uppercase=yes, prefix=yes)
= "0x00FF"
.EE
|