blob: 6b19e82ce269c2d67d183388238513f492887bc3 (
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
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Byte.hex 3 2025-04-30 "Tomo man-pages"
.SH NAME
Byte.hex \- convert to hexidecimal
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Byte.hex\ :\ func(byte:\ Byte,\ uppercase:\ Bool\ =\ yes,\ prefix:\ Bool\ =\ no\ ->\ Text)
.fi
.SH DESCRIPTION
Convert a byte to a hexidecimal text representation.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
byte Byte The byte to convert to hex. -
uppercase Bool Whether or not to use uppercase hexidecimal letters. yes
prefix Bool Whether or not to prepend a `0x` prefix. no
.TE
.SH RETURN
The byte as a hexidecimal text.
.SH EXAMPLES
.EX
>> Byte(18).hex()
= "0x12"
.EE
|