rapidyaml 0.14.0
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
Substring: read/write string views

Topics

 substr adapters
 c4::to_substr() and c4::to_csubstr() are used in generic code like c4::format().
 substr left-comparison operators

Classes

struct  c4::basic_substring< C >
 a non-owning string-view, consisting of a character pointer and a length. More...

Typedefs

using c4::substr = basic_substring<char>
 a mutable string view
using c4::csubstr = basic_substring<const char>
 an immutable string view

Functions

template<class OStream, class C>
OStream & c4::operator<< (OStream &os, basic_substring< C > s)
 output the string to an ostream-like type

Detailed Description

Typedef Documentation

◆ substr

using c4::substr = basic_substring<char>

a mutable string view

Definition at line 2356 of file substr.hpp.

◆ csubstr

using c4::csubstr = basic_substring<const char>

an immutable string view

Definition at line 2357 of file substr.hpp.

Function Documentation

◆ operator<<()

template<class OStream, class C>
OStream & c4::operator<< ( OStream & os,
basic_substring< C > s )
inline

output the string to an ostream-like type

Definition at line 2481 of file substr.hpp.

2482{
2483 C4_SUPPRESS_WARNING_GCC_CLANG_WITH_PUSH("-Wsign-conversion")
2484 os.write(s.str, s.len);
2485 C4_SUPPRESS_WARNING_GCC_CLANG_POP
2486 return os;
2487}
void write(ryml::NodeRef *n, my_seq_type< T > const &seq)