[#BloombergLP-bdlde-Utf8Util-numCharactersIfValid-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/Utf8Util.adoc[Utf8Util]::numCharactersIfValid :relfileprefix: ../../../ :mrdocs: Return the Unicode code‐point count if `string` is valid UTF‐8. == Synopses Declared in `<bdlde_utf8util.h>` Return the Unicode code‐point count if `string` is valid UTF‐8. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdlde/Utf8Util/IntPtr.adoc[Utf8Util::IntPtr] xref:BloombergLP/bdlde/Utf8Util/numCharactersIfValid-0f.adoc[numCharactersIfValid]( char const** invalidString, char const* string); ---- [.small]#xref:BloombergLP/bdlde/Utf8Util/numCharactersIfValid-0f.adoc[_» more..._]# Return the Unicode code‐point count if `string` is valid UTF‐8. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdlde/Utf8Util/IntPtr.adoc[Utf8Util::IntPtr] xref:BloombergLP/bdlde/Utf8Util/numCharactersIfValid-0a.adoc[numCharactersIfValid]( char const** invalidString, char const* string, xref:BloombergLP/bdlde/Utf8Util/size_type.adoc[size_type] length); ---- [.small]#xref:BloombergLP/bdlde/Utf8Util/numCharactersIfValid-0a.adoc[_» more..._]# == Return Value code‐point count on success, or a negative value on invalid UTF‐8 == Parameters [cols="1,4"] |=== | Name| Description | *invalidString* | if non‐null, set to after the last valid code point | *string* | null‐terminated UTF‐8 input to examine | *length* | length of `string` in bytes |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#