Initial Course

This commit is contained in:
David Gil de Gómez Pérez
2026-08-11 17:40:36 +03:00
commit 9aed1d1d86
202 changed files with 3420 additions and 0 deletions
@@ -0,0 +1,30 @@
#include "constructors.hpp"
namespace oop {
StringBuilder::StringBuilder(std::string initial) {
// TODO: Initialize buffer_ from initial
(void)initial;
}
StringBuilder::StringBuilder(const StringBuilder& other) : buffer_(other.buffer_) {}
auto StringBuilder::operator=(const StringBuilder& other) -> StringBuilder& {
if (this != &other) {
buffer_ = other.buffer_;
}
return *this;
}
void StringBuilder::append(const std::string& text) {
// TODO: Append all characters from text
(void)text;
}
auto StringBuilder::str() const -> std::string {
return std::string(buffer_.begin(), buffer_.end());
}
auto StringBuilder::size() const -> std::size_t { return buffer_.size(); }
} // namespace oop