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

Returns a string from current iterator position up to (but not including) next and advances iterator to the character following the on success&period; Will not return a line longer than max&lowbar;line&lowbar;length&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::optional&lt;std::string&lowbar;view&gt;
ReadLine();
----

== Exceptions

[cols="1,4"]
|===
| Name| Thrown on
| `std&colon;&colon;runtime&lowbar;error`
| if max&lowbar;line&lowbar;length &plus; 1 bytes are read without finding &period;
|===

== Return Value

the next string from the buffer&period; std&colon;&colon;nullopt if end of buffer is reached without finding a &period;


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