ludus::foundation::SharedString¶
Ludus Wiki · API overview · Browse API
Class
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
#include <ludus/foundation/strings/shared_string.hpp>
class ludus::foundation::SharedString final
Methods¶
SharedString¶
ludus::foundation::SharedString::SharedString() noexcept=default
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
~SharedString¶
ludus::foundation::SharedString::~SharedString() noexcept
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
SharedString¶
ludus::foundation::SharedString::SharedString(const SharedString &other) noexcept
other's block without allocating or copying bytes. Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
operator=¶
SharedString & ludus::foundation::SharedString::operator=(const SharedString &other) noexcept
other's block before releasing this handle's, so self-assignment is safe. Related types: SharedString
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
SharedString¶
ludus::foundation::SharedString::SharedString(SharedString &&other) noexcept
other's block without touching the retain count; other becomes empty. Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
operator=¶
SharedString & ludus::foundation::SharedString::operator=(SharedString &&other) noexcept
other's; other becomes empty. Self-move does nothing. Related types: SharedString
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
GetSize¶
usize ludus::foundation::SharedString::GetSize() const noexcept
Related types: usize
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
IsEmpty¶
bool ludus::foundation::SharedString::IsEmpty() const noexcept
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
GetView¶
std::string_view ludus::foundation::SharedString::GetView() const &noexcept
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
GetView¶
std::string_view ludus::foundation::SharedString::GetView() const &&=delete
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
GetData¶
const char * ludus::foundation::SharedString::GetData() const &noexcept
GetData()[GetSize()] is always zero; an empty handle returns a static empty string. Lifetime is the same as GetView. Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
GetData¶
const char * ludus::foundation::SharedString::GetData() const &&=delete
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp
Members¶
operator==¶
bool operator==(const SharedString &left, const SharedString &right) noexcept
Related types: SharedString
Declared in modules/foundation/strings/include/ludus/foundation/strings/shared_string.hpp