[#BloombergLP-bslfmt-UnicodeCodePoint-extract] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::xref:BloombergLP/bslfmt/UnicodeCodePoint.adoc[UnicodeCodePoint]::extract :relfileprefix: ../../../ :mrdocs: Extract a code point from no more than the specified `maxBytes` of the byte stream at the specified `bytes` location in the specified `encoding`. Behavior is undefined if the input bytes are not in the specified encoding. Unicode Byte Order Markers are not supported and behavior is undefined if the input data contains an embedded BOM. Endianness is assumed to be that of the type pointed to by `bytes`. == Synopsis Declared in `<bslfmt_unicodecodepoint.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void extract( xref:BloombergLP/bslfmt/UnicodeCodePoint/UtfEncoding.adoc[UtfEncoding] encoding, void const* bytes, size_t maxBytes); ---- == Description For UTF‐8, behavior is undefined if `bytes` is not a valid pointer to an array of `numBytes` `unsigned char` types in contiguous memory. For UTF‐16, behavior is undefined if `bytes` is not a valid pointer to an array of `numBytes/2` `wchar_t` types in contiguous memory. Behavior is undefined if `2 != sizeof(wchar_t)`. Endianness is assumed to be the same as for the `wchar_t` type and Byte Order Markers are not supported. For UTF‐32, behavior is undefined if `bytes` is not a valid pointer to an array of `numBytes/4` `wchar_t` types in contiguous memory. Behavior is undefined if `4 != sizeof(wchar_t)`. Endianness is assumed to be the same as for the `wchar_t` type and Byte Order Markers are not supported. [.small]#Created with https://www.mrdocs.com[MrDocs]#