dev
Download
36 lines 739 BGroffModified 2025-11-29 raw
123456789101112131415161718192021222324252627282930313233343536
'\" t
.\" Copyright (c) 2025 Bruce Hill
.\" All rights reserved.
.\"
.TH Text.utf16 3 2025-11-29 "Tomo man-pages"
.SH NAME
Text.utf16 \- get UTF16 codepoints
.SH LIBRARY
Tomo Standard Library
.SH SYNOPSIS
.nf
.BI Text.utf16\ :\ func(text:\ Text\ ->\ [Int16])
.fi
.SH DESCRIPTION
Returns a list of Unicode code points for UTF16 encoding of the text.


.SH ARGUMENTS

.TS
allbox;
lb lb lbx
l l l.
Name	Type	Description
text	Text	The text from which to extract Unicode code points. 
.TE
.SH RETURN
A list of 16-bit integer Unicode code points (`[Int16]`).

.SH EXAMPLES
.EX
assert "Åke".utf16() == [197, 107, 101]
assert "こんにちは世界".utf16() == [12371, 12435, 12395, 12385, 12399, 19990, 30028]
.EE
.SH SEE ALSO
.BR Tomo-Text (3)