ludus::foundation::StringBuilder¶
Ludus Wiki · API overview · Browse API
Class
operator+ chains or hidden copies. Clear keeps the storage for reuse. Not internally synchronized, like String. Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
#include <ludus/foundation/strings/string.hpp>
class ludus::foundation::StringBuilder final
Methods¶
StringBuilder¶
explicit ludus::foundation::StringBuilder::StringBuilder(const AllocationDomain &domain=GetSystemAllocationDomain()) noexcept
domain; does not allocate. | Parameter | Description |
|---|---|
domain |
Borrowed allocation domain; it must outlive the builder and any taken string.
|
Related types: AllocationDomain
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
TryAppend¶
StringStatus ludus::foundation::StringBuilder::TryAppend(std::string_view value) noexcept
Related types: StringStatus
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
TryAppendMany¶
StringStatus ludus::foundation::StringBuilder::TryAppendMany(std::span< const std::string_view > values) noexcept
Related types: StringStatus
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
TryEnsureCapacity¶
StringStatus ludus::foundation::StringBuilder::TryEnsureCapacity(usize capacity) noexcept
capacity bytes, as String::TryEnsureCapacity. Related types: StringStatus · usize
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
GetView¶
std::string_view ludus::foundation::StringBuilder::GetView() const &noexcept
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
GetView¶
std::string_view ludus::foundation::StringBuilder::GetView() const &&=delete
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
TakeString¶
String ludus::foundation::StringBuilder::TakeString() noexcept
Related types: String
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp
Clear¶
void ludus::foundation::StringBuilder::Clear() noexcept
Declared in modules/foundation/strings/include/ludus/foundation/strings/string.hpp