184 void Reset(const
wchar_t* str =
nullptr) noexcept;
211 wchar_t operator[](const
Size& index) const noexcept;
218 inline explicit operator
bool() const noexcept {
219 return static_cast<const wchar_t*
>(*this) !=
nullptr;
234 explicit operator const wchar_t*()
const noexcept;
241 inline explicit operator std::wstring_view() const noexcept {
242 const wchar_t* text =
static_cast<const wchar_t*
>(*this);
243 return text ? std::wstring_view(text) : std::wstring_view();
251 const wchar_t* text =
static_cast<const wchar_t*
>(*this);
252 return text ? std::wstring(text) : std::wstring();
261 const wchar_t* text =
static_cast<const wchar_t*
>(*this);
287 return !(*
this == other);
303 return !(*
this == str);
318 std::strong_ordering
operator<=>(
const wchar_t* str)
const noexcept;
323 const wchar_t* m_data;
330 static const wchar_t* Duplicate(
const wchar_t* str)
noexcept;
337 static const wchar_t* Duplicate(std::wstring_view sv)
noexcept;
347 return text.operator<<(stream);
394 const wchar_t* raw =
static_cast<const wchar_t*
>(text);
397 return std::hash<std::wstring_view>{}(raw);
Owned NUL-terminated buffer, safe to use across a DLL boundary.
Definition cstring.hxx:103
Owned NUL-terminated wide buffer, safe to use across a DLL boundary.
Definition wcstring.hxx:104
WCString() noexcept
Empty (null) buffer.
std::strong_ordering operator<=>(const wchar_t *str) const noexcept
Content order against a C wide string.
bool operator!=(const WCString &other) const noexcept
Content inequality.
Definition wcstring.hxx:286
void swap(WCString &other) noexcept
Swaps buffers with other.
bool operator!=(const wchar_t *str) const noexcept
Content inequality with a C wide string.
Definition wcstring.hxx:302
std::strong_ordering operator<=>(const WCString &other) const noexcept
Content order.
bool operator==(const WCString &other) const noexcept
Content equality.
STORMBYTE_FORCE_INLINE std::wostream & operator<<(std::wostream &stream) const
Writes the text to stream.
Definition wcstring.hxx:260
bool operator==(const wchar_t *str) const noexcept
Content equality with a C wide string.
Count of abstract units (uint64_t storage).
Definition size.hxx:105
void swap(CString &left, CString &right) noexcept
Swaps two buffers.
Definition cstring.hxx:374
bool operator==(const char *str, const CString &text) noexcept
Content equality.
Definition cstring.hxx:355
bool operator!=(const char *str, const CString &text) noexcept
Content inequality.
Definition cstring.hxx:365
std::ostream & operator<<(std::ostream &stream, const CString &text)
Writes text to stream.
Definition cstring.hxx:345
Root namespace of the StormByte suite.
Host-width-stable count (uint64_t), implicit only to std::size_t.
std::size_t operator()(const StormByte::Safe::WCString &text) const noexcept
Hashes text.
Definition wcstring.hxx:393
#define STORMBYTE_PUBLIC
Definition visibility.h:52