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:914
Inherits from: StringRef
Member Variables
Inherited from StringRef:
- public static npos = ~unsigned long(0)
Method Overview
- private constexpr StringLiteral(const char * Str, size_t N)
- 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_insensitive
- public compare_numeric
- public consumeInteger
- public consumeInteger
- public consume_back
- public consume_back_insensitive
- public consume_front
- public consume_front_insensitive
- public contains
- public contains
- public contains_insensitive
- public contains_insensitive
- public copy
- public count
- public count
- public data
- public detectEOL
- public drop_back
- public drop_front
- public drop_until
- public drop_while
- public edit_distance
- public edit_distance_insensitive
- public empty
- public end
- public endswith
- public endswith_insensitive
- public equals
- public equals_insensitive
- 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_insensitive
- public find_insensitive
- public find_last_not_of
- public find_last_not_of
- public find_last_of
- public find_last_of
- 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_insensitive
- public rfind_insensitive
- public rsplit
- public rsplit
- public rtrim
- public rtrim
- public size
- public slice
- public split
- public split
- public split
- public split
- public startswith
- public startswith_insensitive
- public str
- public substr
- public take_back
- public take_front
- public take_until
- public take_while
- public trim
- public trim
- public upper
Methods
¶constexpr StringLiteral(const char* Str, size_t N)
constexpr StringLiteral(const char* Str, size_t N)
Declared at: llvm/include/llvm/ADT/StringRef.h:916
Parameters
- const char* Str
- size_t N
¶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:921
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:934
Templates
- size_t N
Parameters
- const char (&)[N] Str