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

Return whether `string` contains valid UTF&hyphen;8&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);
----

== Description

Return `true` if the specified `string` 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 beginning of the first invalid UTF&hyphen;8 sequence encountered&semi; `invalidString` is unaffected if `string` contains only valid UTF&hyphen;8&period; `string` is necessarily null&hyphen;terminated, so it cannot contain embedded null bytes&period;

== Return Value

`true` if `string` is valid UTF&hyphen;8, and `false` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *invalidString*
| if non&hyphen;null, set to the first invalid sequence
| *string*
| null&hyphen;terminated UTF&hyphen;8 input to validate
|===


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