blob: 66c3beb8d57b276e922001b2e9a8e4685ac8d831 (
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
|
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Int.format 3 2025-04-21T14:58:16.945841 "Tomo man-pages"
.SH NAME
Int.format \- text formatting
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Int.format\ :\ func(i:\ Int,\ digits:\ Int\ =\ 0\ ->\ Text)
.fi
.SH DESCRIPTION
Formats an integer as a string with a specified number of digits.
.SH ARGUMENTS
.TS
allbox;
lb lb lbx lb
l l l l.
Name Type Description Default
i Int The integer to be formatted. -
digits Int The minimum number of digits to which the integer should be padded. 0
.TE
.SH RETURN
A string representation of the integer, padded to the specified number of digits.
.SH EXAMPLES
.EX
>> (42).format(digits=5)
= "00042"
.EE
|