aboutsummaryrefslogtreecommitdiff
path: root/man/man3/tomo-Text.utf8.3
blob: 5490c8824551d6cb2d383eae0c2b4f213c9e81a5 (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 Text.utf8 3 2025-11-29 "Tomo man-pages"
.SH NAME
Text.utf8 \- get UTF8 bytes
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Text.utf8\ :\ func(text:\ Text\ ->\ [Byte])
.fi
.SH DESCRIPTION
Converts a `Text` value to a list of bytes representing a UTF8 encoding of the text.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx
l l l.
Name	Type	Description
text	Text	The text to be converted to UTF8 bytes. 
.TE
.SH RETURN
A list of bytes (`[Byte]`) representing the text in UTF8 encoding.

.SH EXAMPLES
.EX
assert "Amélie".utf8() == [65, 109, 195, 169, 108, 105, 101]
.EE
.SH SEE ALSO
.BR Tomo-Text (3)