Constructors
Declared in <llvm/ADT/StringRef.h>
Construct an empty string ref.
constexpr
StringRef() = default;
» more...
Disable conversion from nullptr. This prevents things like if (S == nullptr)
StringRef(std::nullptr_t Null) = delete;
» more...
Construct a string ref from an std::string_view.
constexpr
StringRef(std::string_view Str);
» more...
Construct a string ref from an std::string.
StringRef(std::string const& Str);
» more...
Construct a string ref from a cstring.
constexpr
StringRef(char const* Str);
» more...
Construct a string ref from a pointer and length.
constexpr
StringRef(
char const* data,
size_t length);
» more...
| Name | Description |
|---|---|
| Null | Unused; this overload is deleted. |
| Str | View whose data and size are referenced. |
| data | Pointer to the first character. |
| length | Number of characters. |