14 #ifndef LLVM_ADT_SMALLSTRING_H
15 #define LLVM_ADT_SMALLSTRING_H
24 template<
unsigned InternalLen>
34 template<
typename ItTy>
48 void assign(
size_t NumElts,
char Elt) {
53 template<
typename in_iter>
76 template<
typename in_iter>
81 void append(
size_t NumInputs,
char Elt) {
150 size_t find(
char C,
size_t From = 0)
const {
StringRef slice(size_t Start, size_t End) const
void push_back(const T &Elt)
int compare_lower(StringRef RHS) const
compare_lower - Compare two strings, ignoring case.
void assign(StringRef RHS)
Assign from a StringRef.
SmallString(ItTy S, ItTy E)
Initialize with a range.
size_t find(StringRef Str, size_t From=0) const
size_t find(char C, size_t From=0) const
void append(const SmallVectorImpl< char > &RHS)
Append from a SmallVector.
bool endswith(StringRef Suffix) const
Check if this string ends with the given Suffix.
bool equals_lower(StringRef RHS) const
Check for string equality, ignoring case.
size_t rfind(char C, size_t From=npos) const
StringRef substr(size_t Start, size_t N=npos) const
int compare_numeric(StringRef RHS) const
size_t find_last_of(char C, size_t From=StringRef::npos) const
SmallString(const SmallString &RHS)
Copy ctor.
int compare(StringRef RHS) const
StringRef substr(size_t Start, size_t N=StringRef::npos) const
SmallString & operator+=(char C)
void append(size_t NumInputs, char Elt)
int compare(StringRef RHS) const
SmallString & operator+=(StringRef RHS)
size_t rfind(StringRef Str) const
size_t count(char C) const
Return the number of occurrences of C in the string.
size_t find_first_not_of(StringRef Chars, size_t From=0) const
void assign(unsigned NumElts, const T &Elt)
void assign(const SmallVectorImpl< char > &RHS)
Assign from a SmallVector.
bool equals(StringRef RHS) const
size_t rfind(char C, size_t From=StringRef::npos) const
SmallString(StringRef S)
Initialize from a StringRef.
int compare_lower(StringRef RHS) const
compare_lower - Compare two strings, ignoring case.
void append(in_iter S, in_iter E)
Append from an iterator pair.
size_t find_last_of(StringRef Chars, size_t From=StringRef::npos) const
size_t count(StringRef Str) const
void append(StringRef RHS)
Append from a StringRef.
size_t count(char C) const
Return the number of occurrences of C in the string.
SmallString()
Default ctor - Initialize to empty.
size_t find(char C, size_t From=0) const
bool startswith(StringRef Prefix) const
startswith - Check if this string starts with the given Prefix.
void assign(size_t NumElts, char Elt)
Assign from a repeated element.
void append(in_iter in_start, in_iter in_end)
size_t find_first_not_of(char C, size_t From=0) const
size_t find_last_of(char C, size_t From=npos) const
bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
bool endswith(StringRef Suffix) const
endswith - Check if this string ends with the given Suffix.
StringRef str() const
Explicit conversion to StringRef.
bool equals(StringRef RHS) const
size_t find_first_of(StringRef Chars, size_t From=0) const
pointer data()
data - Return a pointer to the vector's buffer, even if empty().
bool equals_lower(StringRef RHS) const
equals_lower - Check for string equality, ignoring case.
size_t find_first_not_of(char C, size_t From=0) const
size_t find_first_of(char C, size_t From=0) const
int compare_numeric(StringRef RHS) const
compare_numeric - Compare strings, handle embedded numbers.
StringRef slice(size_t Start, size_t End) const
size_t find_first_of(char C, size_t From=0) const
const SmallString & operator=(StringRef RHS)
void assign(in_iter S, in_iter E)
Assign from an iterator pair.