Boost C++ Libraries: Ticket #9576: read_until for string_ref https://svn.boost.org/trac10/ticket/9576 <pre class="wiki">string_ref read_until(string_ref&amp; is, const char* sep); </pre><p> Could we have a function like this that reads until a separator, returns the part before the separator and then eats the separator? It should read and return the entire input if no separator is found. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9576 Trac 1.4.3 Marshall Clow Wed, 15 Jan 2014 17:03:22 GMT status changed https://svn.boost.org/trac10/ticket/9576#comment:1 https://svn.boost.org/trac10/ticket/9576#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> I have a problem with calling this "read", because <code>string_view</code> does providing a stream-like interface. </p> <p> <code>head</code> might be a better name for what you are proposing. </p> <p> And the general case here is (I believe) <code>split (string_view, delimiter)</code> which returns some kind of container of string_views. </p> <p> Hrm... </p> Ticket Marshall Clow Wed, 15 Jan 2014 18:14:17 GMT <link>https://svn.boost.org/trac10/ticket/9576#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9576#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9576#comment:1" title="Comment 1">marshall</a>: </p> <blockquote class="citation"> <p> I have a problem with calling this "read", because <code>string_view</code> does providing a stream-like interface. </p> </blockquote> <p> Does NOT. </p> <p> Sheesh. </p> </description> <category>Ticket</category> </item> <item> <author>Olaf van der Spek <ml@…></author> <pubDate>Fri, 24 Jan 2014 09:04:41 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9576#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9576#comment:3</guid> <description> <p> Would head still forward the begin pointer of the string_ref? IMO read is fine, Asio has a read_until too. </p> </description> <category>Ticket</category> </item> </channel> </rss>