SlHelpers
Loading...
Searching...
No Matches
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.
std::optional< std::string_view > get () noexcept
 Read one line.

Detailed Description

Parses a string view into lines.

Use like:

GetLine g("str");
while (auto line = g.get()) {}
GetLine(std::string_view str) noexcept
Construct GetLine to parse str.
Definition String.h:31

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:
  • /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9-build/slhelpers-20260428.f233ce9/include/helpers/String.h