[#BloombergLP-bslim-FuzzUtil-consumeRandomLengthChars-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslim.adoc[bslim]::xref:BloombergLP/bslim/FuzzUtil.adoc[FuzzUtil]::consumeRandomLengthChars
:relfileprefix: ../../../
:mrdocs:

`consumeRandomLengthChars` overloads

== Synopses

Declared in `&lt;bslim&lowbar;fuzzutil&period;h&gt;`

Load into the specified `output` a sequence of characters of length from 0 to the specified `maxLength`&period; If the specified `fuzzDataView` has fewer bytes than `maxLength`, load at most `fuzzDataView&hyphen;&gt;length()` bytes into `output`&period; If the buffer in `fuzzDataView` contains two successive backslash characters, then in `output` they will be converted to a single backslash () character&semi; if a single backslash character is encountered, the consumption of bytes is terminated&period; Note that because double backslashes are mapped to single backslashes, more than `maxLength` bytes may be consumed from the buffer to produce the `output`&period; Also note that the purpose of this function is to enable the creation of a non&hyphen;zero&hyphen;terminated `string&lowbar;view`, which is not possible with the `string` counterpart&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bslim/FuzzUtil/consumeRandomLengthChars-0a.adoc[consumeRandomLengthChars](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char&gt;]* output,
    xref:BloombergLP/bslim/FuzzDataView.adoc[FuzzDataView]* fuzzDataView,
    std::size&lowbar;t maxLength);
----

[.small]#xref:BloombergLP/bslim/FuzzUtil/consumeRandomLengthChars-0a.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload for `std&colon;&colon;pmr&colon;&colon;vector&lt;char&gt;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bslim/FuzzUtil/consumeRandomLengthChars-0e3.adoc[consumeRandomLengthChars](
    std::pmr::vector&lt;char&gt;* output,
    xref:BloombergLP/bslim/FuzzDataView.adoc[FuzzDataView]* fuzzDataView,
    std::size&lowbar;t maxLength);
----

[.small]#xref:BloombergLP/bslim/FuzzUtil/consumeRandomLengthChars-0e3.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload for `std&colon;&colon;vector&lt;char&gt;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
xref:BloombergLP/bslim/FuzzUtil/consumeRandomLengthChars-0ed.adoc[consumeRandomLengthChars](
    std::vector&lt;char&gt;* output,
    xref:BloombergLP/bslim/FuzzDataView.adoc[FuzzDataView]* fuzzDataView,
    std::size&lowbar;t maxLength);
----

[.small]#xref:BloombergLP/bslim/FuzzUtil/consumeRandomLengthChars-0ed.adoc[_» more&period;&period;&period;_]#


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