-// Copyright (C) 2021 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
return result;
}
-TextTable::Cell::Cell(const std::string& text)
- : m_text(text),
- m_right_align(false)
+TextTable::Cell::Cell(const std::string& text) : m_text(text)
+{
+}
+
+TextTable::Cell::Cell(std::string_view text) : Cell(std::string(text))
{
}
-// Copyright (C) 2021-2022 Joel Rosdahl and other contributors
+// Copyright (C) 2021-2023 Joel Rosdahl and other contributors
//
// See doc/AUTHORS.adoc for a complete list of contributors.
//
#include <cstdint>
#include <string>
+#include <string_view>
#include <vector>
namespace util {
{
public:
Cell(const std::string& text);
+ Cell(std::string_view text);
Cell(const char* text);
Cell(uint64_t number);