14 #ifndef LLVM_ADT_SMALLSTRING_H 15 #define LLVM_ADT_SMALLSTRING_H 25 template<
unsigned InternalLen>
35 template<
typename ItTy>
46 void assign(
size_t NumElts,
char Elt) {
51 template<
typename in_iter>
74 template<
typename in_iter>
79 void append(
size_t NumInputs,
char Elt) {
297 #endif // LLVM_ADT_SMALLSTRING_H
size_t count(char C) const
Return the number of occurrences of C in the string.
This class represents lattice values for constants.
void assign(StringRef RHS)
Assign from a StringRef.
LLVM_NODISCARD bool equals_lower(StringRef RHS) const
equals_lower - Check for string equality, ignoring case.
int compare_lower(StringRef RHS) const
compare_lower - Compare two strings, ignoring case.
SmallString(ItTy S, ItTy E)
Initialize with a range.
LLVM_NODISCARD size_t rfind(char C, size_t From=npos) const
Search for the last character C in the string.
size_t find(char C, size_t From=0) const
find - Search for the first character C in the string.
void push_back(const T &Elt)
void append(const SmallVectorImpl< char > &RHS)
Append from a SmallVector.
LLVM_NODISCARD size_t find_last_of(char C, size_t From=npos) const
Find the last character in the string that is C, or npos if not found.
int compare_numeric(StringRef RHS) const
compare_numeric - Compare two strings, treating sequences of digits as numbers.
SmallString & operator+=(char C)
size_t find_first_not_of(char C, size_t From=0) const
Find the first character in the string that is not C or npos if not found.
void append(size_t NumInputs, char Elt)
size_t rfind(char C, size_t From=StringRef::npos) const
Search for the last character C in the string.
size_t find_first_of(char C, size_t From=0) const
Find the first character in the string that is C, or npos if not found.
SmallString & operator+=(StringRef RHS)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool endswith(StringRef Suffix) const
Check if this string ends with the given Suffix.
int compare(StringRef RHS) const
Compare two strings; the result is -1, 0, or 1 if this string is lexicographically less than...
LLVM_NODISCARD size_t count(char C) const
Return the number of occurrences of C in the string.
void assign(const SmallVectorImpl< char > &RHS)
Assign from a SmallVector.
bool equals_lower(StringRef RHS) const
Check for string equality, ignoring case.
bool endswith(StringRef Suffix) const
endswith - Check if this string ends with the given Suffix.
void assign(size_type NumElts, const T &Elt)
StringRef str() const
Explicit conversion to StringRef.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
StringRef slice(size_t Start, size_t End) const
Return a reference to the substring from [Start, End).
SmallString(StringRef S)
Initialize from a StringRef.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
size_t find_last_of(char C, size_t From=StringRef::npos) const
Find the last character in the string that is C, or npos if not found.
size_t find(StringRef Str, size_t From=0) const
Search for the first string Str in the string.
void append(in_iter S, in_iter E)
Append from an iterator pair.
void append(StringRef RHS)
Append from a StringRef.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
LLVM_NODISCARD size_t find_first_not_of(char C, size_t From=0) const
Find the first character in the string that is not C or npos if not found.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE int compare(StringRef RHS) const
compare - Compare two strings; the result is -1, 0, or 1 if this string is lexicographically less tha...
void assign(size_t NumElts, char Elt)
Assign from a repeated element.
size_t find_first_not_of(StringRef Chars, size_t From=0) const
Find the first character in the string that is not in the string Chars, or npos if not found...
bool equals(StringRef RHS) const
Check for string equality.
LLVM_NODISCARD int compare_lower(StringRef RHS) const
compare_lower - Compare two strings, ignoring case.
BlockVerifier::State From
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
SmallString()=default
Default ctor - Initialize to empty.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef slice(size_t Start, size_t End) const
Return a reference to the substring from [Start, End).
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool equals(StringRef RHS) const
equals - Check for string equality, this is more efficient than compare() when the relative ordering ...
void append(in_iter in_start, in_iter in_end)
Add the specified range to the end of the SmallVector.
LLVM_NODISCARD int compare_numeric(StringRef RHS) const
compare_numeric - Compare two strings, treating sequences of digits as numbers.
bool startswith(StringRef Prefix) const
startswith - Check if this string starts with the given Prefix.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
pointer data()
Return a pointer to the vector's buffer, even if empty().
LLVM_NODISCARD size_t find_first_of(char C, size_t From=0) const
Find the first character in the string that is C, or npos if not found.
StringRef substr(size_t Start, size_t N=StringRef::npos) const
Return a reference to the substring from [Start, Start + N).
size_t find_last_of(StringRef Chars, size_t From=StringRef::npos) const
Find the last character in the string that is in C, or npos if not found.
size_t count(StringRef Str) const
Return the number of non-overlapped occurrences of Str in the string.
size_t find_first_of(StringRef Chars, size_t From=0) const
Find the first character in the string that is in Chars, or npos if not found.
StringRef - Represent a constant reference to a string, i.e.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t find(char C, size_t From=0) const
Search for the first character C in the string.
const SmallString & operator=(StringRef RHS)
void assign(in_iter S, in_iter E)
Assign from an iterator pair.
size_t rfind(StringRef Str) const
Search for the last string Str in the string.