36 kFullFlag = 1ull << FlagConstant::kReserveIsSizeShift
53 static_assert(
sizeof(
DataDesc) == 0x10);
85 [[nodiscard]]
const char&
front()
const;
88 [[nodiscard]]
const char&
back()
const;
90 [[nodiscard]]
const char*
data() const noexcept;
93 [[nodiscard]] const
char*
c_str() const noexcept;
95 operator
std::string_view() const noexcept;
98 [[nodiscard]]
bool empty() const noexcept;
107 inline friend
bool operator==(const
GString& a_lhs, const
char* a_rhs) {
return (a_lhs.data() == a_rhs || std::strcmp(a_lhs.data(), a_rhs) == 0); }
108 inline friend bool operator!=(
const GString& a_lhs,
const char* a_rhs) {
return !(a_lhs == a_rhs); }
109 inline friend bool operator==(
const char* a_lhs,
const GString& a_rhs) {
return a_rhs == a_lhs; }
110 inline friend bool operator!=(
const char* a_lhs,
const GString& a_rhs) {
return !(a_lhs == a_rhs); }
113 inline friend bool operator==(
const GString& a_lhs,
const std::string_view& a_rhs) {
return a_lhs == a_rhs.
data(); }
114 inline friend bool operator!=(
const GString& a_lhs,
const std::string_view& a_rhs) {
return !(a_lhs == a_rhs); }
115 inline friend bool operator==(
const std::string_view& a_lhs,
const GString& a_rhs) {
return a_rhs == a_lhs; }
116 inline friend bool operator!=(
const std::string_view& a_lhs,
const GString& a_rhs) {
return !(a_lhs == a_rhs); }
129 static_assert(
sizeof(
GString) == 0x8);
UPInt size_type
Definition: GString.h:11
friend bool operator==(const char *a_lhs, const GString &a_rhs)
Definition: GString.h:109
GString * ctor(const char *a_str)
const char & front() const
HeapType
Definition: GString.h:16
friend bool operator==(const GString &a_lhs, const GString &a_rhs)
Definition: GString.h:111
DataDesc * get_desc() const
GString & operator=(const char *a_rhs)
GString & operator=(GString &&a_rhs)
GString(const char *a_rhs)
char value_type
Definition: GString.h:10
size_type length() const noexcept
friend bool operator!=(const GString &a_lhs, const char *a_rhs)
Definition: GString.h:108
friend bool operator==(const std::string_view &a_lhs, const GString &a_rhs)
Definition: GString.h:115
const_reference operator[](size_type a_pos) const
friend bool operator!=(const std::string_view &a_lhs, const GString &a_rhs)
Definition: GString.h:116
reference operator[](size_type a_pos)
friend bool operator!=(const char *a_lhs, const GString &a_rhs)
Definition: GString.h:110
const char * data() const noexcept
void set_desc(DataDesc *a_desc)
static UPInt BernsteinHashFunction(const void *a_dataIn, UPInt a_size, UPInt a_seed=5381)
GString(const std::string_view &a_rhs)
const value_type & const_reference
Definition: GString.h:13
friend bool operator!=(const GString &a_lhs, const GString &a_rhs)
Definition: GString.h:112
GString(const GString &a_rhs)
friend bool operator==(const GString &a_lhs, const std::string_view &a_rhs)
Definition: GString.h:113
GString & operator=(const std::string_view &a_rhs)
HeapType heap_type() const
DataDescUnion _dataDesc
Definition: GString.h:127
GString & operator=(const GString &a_rhs)
size_type size() const noexcept
bool empty() const noexcept
const char & back() const
friend bool operator!=(const GString &a_lhs, const std::string_view &a_rhs)
Definition: GString.h:114
const char * c_str() const noexcept
value_type & reference
Definition: GString.h:12
Definition: AbsorbEffect.h:6
std::size_t UPInt
Definition: SFTypes.h:5
Definition: NiBinaryStream.h:94
@ kFullFlag
Definition: GString.h:36
char data[1]
Definition: GString.h:51
volatile std::int32_t refCount
Definition: GString.h:50
UPInt capacity
Definition: GString.h:49
UPInt GetCapacity() const
FlagConstant
Definition: GString.h:26
@ kReserveIsSizeShift
Definition: GString.h:27
stl::enumeration< HeapType, UPInt > heapType
Definition: GString.h:60
DataDesc * data
Definition: GString.h:59