class StringLiteral
Declaration
class StringLiteral : public StringRef { /* full declaration omitted */ };
Description
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs with the length computed at compile time. In order to avoid the invocation of a global constructor, StringLiteral should *only* be used in a constexpr context, as such: constexpr StringLiteral S("test");
Declared at: llvm/include/llvm/ADT/StringRef.h:860
Inherits from: StringRef
Member Variables
Inherited from StringRef:
- public static npos = ~unsigned long(0)
Method Overview
- public template <size_t N>constexpr StringLiteral(const char (&)[N] Str)
- public template <size_t N>static constexpr llvm::StringLiteral withInnerNUL(const char (&)[N] Str)
Inherited from StringRef:
- public back
- public begin
- public bytes
- public bytes_begin
- public bytes_end
- public compare
- public compare_lower
- public compare_numeric
- public consumeInteger
- public consumeInteger
- public consume_back
- public consume_front
- public contains
- public contains
- public contains_lower
- public contains_lower
- public copy
- public count
- public count
- public data
- public drop_back
- public drop_front
- public drop_until
- public drop_while
- public edit_distance
- public empty
- public end
- public endswith
- public endswith_lower
- public equals
- public equals_lower
- public find
- public find
- public find_first_not_of
- public find_first_not_of
- public find_first_of
- public find_first_of
- public find_if
- public find_if_not
- public find_last_not_of
- public find_last_not_of
- public find_last_of
- public find_last_of
- public find_lower
- public find_lower
- public front
- public getAsDouble
- public getAsInteger
- public getAsInteger
- public getAsInteger
- public lower
- public ltrim
- public ltrim
- public operator basic_string
- public rfind
- public rfind
- public rfind_lower
- public rfind_lower
- public rsplit
- public rsplit
- public rtrim
- public rtrim
- public size
- public slice
- public split
- public split
- public split
- public split
- public startswith
- public startswith_lower
- public str
- public substr
- public take_back
- public take_front
- public take_until
- public take_while
- public trim
- public trim
- public upper
- public withNullAsEmpty
Methods
¶template <size_t N>
constexpr StringLiteral(const char (&)[N] Str)
template <size_t N>
constexpr StringLiteral(const char (&)[N] Str)
Declared at: llvm/include/llvm/ADT/StringRef.h:867
Templates
- size_t N
Parameters
- const char (&)[N] Str
¶template <size_t N>
static constexpr llvm::StringLiteral withInnerNUL(
const char (&)[N] Str)
template <size_t N>
static constexpr llvm::StringLiteral withInnerNUL(
const char (&)[N] Str)
Declared at: llvm/include/llvm/ADT/StringRef.h:880
Templates
- size_t N
Parameters
- const char (&)[N] Str