1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-05 16:07:34 +00:00
serenity/Userland/Applications/Spreadsheet/Writers/CSV.h
2022-04-01 21:24:45 +01:00

24 lines
549 B
C++

/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "XSV.h"
#include <AK/Forward.h>
#include <AK/StringView.h>
namespace Writer {
template<typename ContainerType>
class CSV : public XSV<ContainerType> {
public:
CSV(OutputStream& output, ContainerType const& data, Vector<StringView> const& headers = {}, WriterBehavior behaviors = default_behaviors())
: XSV<ContainerType>(output, data, { ",", "\"", WriterTraits::Repeat }, headers, behaviors)
{
}
};
}