AsmJit
Low-Latency Machine Code Generation
A simple non-reference counted string that uses small string optimization (SSO).
This string has 3 allocation possibilities:
kSSOCapacity
characters. This should handle most small strings and thus avoid dynamic memory allocation for most use-cases.Creates a default-initialized string if zero length.
Creates a string that takes ownership of the content of the other
string.
Reset the string into a construction state.
Tests whether the string is empty.
Returns the size of the string.
Returns the capacity of the string.
Returns the data of the string.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Swaps the content of this string with other
.
Clears the content of the string.
SIZE_MAX
)noexcept[1/3]◆ Replaces the current of the string with data
of the given size
.
Null terminated strings can set size
to SIZE_MAX
.
Replaces the current of the string with other
string.
Replaces the current of the string by a single c
character.
Replaces the current of the string by a c
character, repeated n
times.
0
, size_t width = 0
, StringFormatFlags flags = StringFormatFlags::kNone
)noexcept◆ Replaces the current of the string by a formatted integer i
(signed).
0
, size_t width = 0
, StringFormatFlags flags = StringFormatFlags::kNone
)noexcept◆ Replaces the current of the string by a formatted integer i
(unsigned).
'\0'
)noexcept◆ Replaces the current of the string by the given data
converted to a HEX string.
Replaces the current of the string by a formatted string fmt
.
Replaces the current of the string by a formatted string fmt
(va_list version).
SIZE_MAX
)noexcept[1/3]◆ Appends str
having the given size size
to the string.
Null terminated strings can set size
to SIZE_MAX
.
Appends other
string to this string.
Appends a single c
character.
Appends c
character repeated n
times.
0
, size_t width = 0
, StringFormatFlags flags = StringFormatFlags::kNone
)noexcept◆ Appends a formatted integer i
(signed).
0
, size_t width = 0
, StringFormatFlags flags = StringFormatFlags::kNone
)noexcept◆ Appends a formatted integer i
(unsigned).
'\0'
)noexcept◆ Appends the given data
converted to a HEX string.
Appends a formatted string fmt
with args
.
Appends a formatted string fmt
(va_list version).
Truncate the string length into newSize
.
Resets string to embedded and makes it empty (zero length, zero first char)