[#util-LineReader-ReadLength]
= xref:util.adoc[util]::xref:util/LineReader.adoc[LineReader]::ReadLength
:relfileprefix: ../../
:mrdocs:

Returns string from current iterator position of specified length if possible and advances iterator on success&period; May exceed max&lowbar;line&lowbar;length but will not read past end of buffer&period;

== Synopsis

Declared in `&lt;util&sol;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::string&lowbar;view
ReadLength(size&lowbar;t len);
----

== Exceptions

[cols="1,4"]
|===
| Name| Thrown on
| `std&colon;&colon;runtime&lowbar;error`
| if there is not enough data in the buffer&period;
|===

== Return Value

a string of the expected length&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *len* [in]
| The number of bytes to read from the buffer
|===


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