header_utils
Loading...
Searching...
No Matches
Text Lines

Functions

std::vector< std::string > ghassanpl::formats::text_lines::load_file (std::filesystem::path const &from, std::error_code &ec)
 
std::vector< std::string > ghassanpl::formats::text_lines::load_file (std::filesystem::path const &from)
 
template<typename CALLBACK >
requires std::invocable<CALLBACK, std::string_view>
void ghassanpl::formats::text_lines::load_file (std::filesystem::path const &from, CALLBACK &&callback)
 
std::vector< std::string > ghassanpl::formats::text_lines::try_load_file (std::filesystem::path const &from)
 
template<std::ranges::range T>
bool ghassanpl::formats::text_lines::save_file (std::filesystem::path const &to, T string_range, std::error_code &ec)
 
template<std::ranges::range T>
void ghassanpl::formats::text_lines::save_file (std::filesystem::path const &to, T string_range)
 

Detailed Description

Todo:
These are technically incorrect as they don't remove \r at split points

Function Documentation

◆ load_file() [1/3]

std::vector< std::string > ghassanpl::formats::text_lines::load_file ( std::filesystem::path const from)
inline

Definition at line 85 of file json_helpers.h.

◆ load_file() [2/3]

template<typename CALLBACK >
requires std::invocable<CALLBACK, std::string_view>
void ghassanpl::formats::text_lines::load_file ( std::filesystem::path const from,
CALLBACK &&  callback 
)
inline

Definition at line 99 of file json_helpers.h.

◆ load_file() [3/3]

std::vector< std::string > ghassanpl::formats::text_lines::load_file ( std::filesystem::path const from,
std::error_code &  ec 
)
inline

Definition at line 74 of file json_helpers.h.

◆ save_file() [1/2]

template<std::ranges::range T>
void ghassanpl::formats::text_lines::save_file ( std::filesystem::path const to,
string_range 
)
inline

Definition at line 131 of file json_helpers.h.

◆ save_file() [2/2]

template<std::ranges::range T>
bool ghassanpl::formats::text_lines::save_file ( std::filesystem::path const to,
string_range,
std::error_code &  ec 
)
inline

Definition at line 118 of file json_helpers.h.

◆ try_load_file()

std::vector< std::string > ghassanpl::formats::text_lines::try_load_file ( std::filesystem::path const from)
inline

Definition at line 111 of file json_helpers.h.