81 inline bool operator!= (
const Identifier& other)
const noexcept {
return name.getCharPointer() != other.name.
getCharPointer(); }
84 inline bool operator== (
StringRef other)
const noexcept {
return name == other; }
87 inline bool operator!= (
StringRef other)
const noexcept {
return name != other; }
90 inline bool operator< (
StringRef other)
const noexcept {
return name < other; }
93 inline bool operator<= (
StringRef other)
const noexcept {
return name <= other; }
96 inline bool operator> (
StringRef other)
const noexcept {
return name > other; }
99 inline bool operator>= (
StringRef other)
const noexcept {
return name >= other; }
114 bool isValid() const noexcept {
return name.isNotEmpty(); }
117 bool isNull() const noexcept {
return name.isEmpty(); }
126 static bool isValidIdentifier (
const String& possibleIdentifier)
noexcept;
Wraps a pointer to a null-terminated UTF-8 character string, and provides various methods to operate ...
Represents a string identifier, designed for accessing properties by name.
bool isNull() const noexcept
Returns true if this Identifier is null.
String::CharPointerType getCharPointer() const noexcept
Returns this identifier's raw string pointer.
bool isValid() const noexcept
Returns true if this Identifier is not null.
const String & toString() const noexcept
Returns this identifier as a string.
static Identifier null
A null identifier.
A simple class for holding temporary references to a string literal or String.
CharPointerType getCharPointer() const noexcept
Returns the character pointer currently being used to store this string.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...