[#BloombergLP-bdlde-Utf8Util-isValid-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/Utf8Util.adoc[Utf8Util]::isValid
:relfileprefix: ../../../
:mrdocs:

Return `true` if the specified `string` having the specified `length` (in bytes) contains valid UTF&hyphen;8, and `false` otherwise&period; If `string` contains invalid UTF&hyphen;8, load into the specified `invalidString` the address of the byte after the last valid code point traversed&semi; `invalidString` is unaffected if `string` contains only valid UTF&hyphen;8&period; `string` need not be null&hyphen;terminated and can contain embedded null bytes, and `string` may be null if `0 &equals;&equals; length` (see &lcub;Empty Input Strings&rcub;)&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;utf8util&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
bool
isValid(
    char const** invalidString,
    char const* string,
    xref:BloombergLP/bdlde/Utf8Util/size_type.adoc[size&lowbar;type] length);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
