nulib ~master (2025-12-14T08:31:17.4307625)
Dub
Repo
toUTF16
nulib
text
unicode
Converts the given string to a UTF-16 string.
This will always create a copy.
@
nogc
ref
auto ref
toUTF16
(
FromT
)
(
auto
ref
FromT
from
,
bool
addBOM
= false
)
if
(
isSomeSafeString
!
FromT
)
Meta
Source
See Implementation
nulib
text
unicode
modules
utf16
utf32
utf8
aliases
GraphemeSequence
UnicodeSequence
UnicodeSlice
codepoint
functions
decode
encode
getEndianFromBOM
hasSurrogatePairs
isBOM
isBigEndianBOM
isLittleEndianBOM
toUTF16
toUTF32
toUTF8
validate
static variables
unicodeReplacementCharacter
structs
Grapheme
variables
UNICODE_BOM
Converts the given string to a UTF-16 string.
This will always create a copy.