35 std::string_view
line;
61 for (
const auto& [key, value] : vCard) {
73 for (
const auto& [key, value] : vCard) {
77 result += value +
'\n';
89 std::filesystem::path
tmpPath = path;
95 std::filesystem::rename(
tmpPath, path);
103 for (
auto it = vCard.begin();
it != vCard.end();) {
105 it = vCard.erase(
it);
bool createFileLink(const std::filesystem::path &linkFile, const std::filesystem::path &target, bool hard)
void removeByKey(VCardData &vCard, std::string_view key)
std::map< std::string, std::string, std::less<> > VCardData
std::string toString(const VCardData &vCard)
VCardData toMap(std::string_view content)
Payload to vCard.
void save(const VCardData &vCard, const std::filesystem::path &path, const std::filesystem::path &pathLink)
void emitSignal(Args... args)
bool getline(std::string_view &str, std::string_view &line, char delim='\n')
Similar to @getline_full but skips empty results.
static bool starts_with(std::string_view str, std::string_view prefix)
static constexpr std::string_view END_LINE_TOKEN
static constexpr std::string_view BEGIN_TOKEN
static constexpr std::string_view BEGIN_TOKEN_KEY
static constexpr std::string_view END_TOKEN
static constexpr std::string_view END_TOKEN_KEY
static constexpr std::string_view VCARD_VERSION
static constexpr std::string_view PHOTO_PNG
static constexpr std::string_view FORMATTED_NAME