SlHelpers
SlHelpers::GetLine Class Reference

Parses a string view into lines. More...

#include <String.h>

Public Member Functions

 GetLine (std::string_view str) noexcept
 Construct GetLine to parse str. More...
 
std::optional< std::string_view > get () noexcept
 Read one line. More...
 

Detailed Description

Parses a string view into lines.

Use like:

GetLine g("str");
while (auto line = g.get()) {}

Constructor & Destructor Documentation

◆ GetLine()

SlHelpers::GetLine::GetLine ( std::string_view  str)
inlinenoexcept

Construct GetLine to parse str.

Parameters
strString to parse

Member Function Documentation

◆ get()

std::optional<std::string_view> SlHelpers::GetLine::get ( )
inlinenoexcept

Read one line.

Returns
Line if one was read, otherwise nullopt.

The documentation for this class was generated from the following file: