LLVM API Documentation
#include <SmallString.h>


Public Member Functions | |
| SmallString () | |
| Default ctor - Initialize to empty. | |
| SmallString (StringRef S) | |
| Initialize from a StringRef. | |
| template<typename ItTy > | |
| SmallString (ItTy S, ItTy E) | |
| Initialize with a range. | |
| void | assign (size_t NumElts, char Elt) |
| Assign from a repeated element. | |
| template<typename in_iter > | |
| void | assign (in_iter S, in_iter E) |
| Assign from an iterator pair. | |
| void | assign (StringRef RHS) |
| Assign from a StringRef. | |
| void | assign (const SmallVectorImpl< char > &RHS) |
| Assign from a SmallVector. | |
| template<typename in_iter > | |
| void | append (in_iter S, in_iter E) |
| Append from an iterator pair. | |
| void | append (size_t NumInputs, char Elt) |
| void | append (StringRef RHS) |
| Append from a StringRef. | |
| void | append (const SmallVectorImpl< char > &RHS) |
| Append from a SmallVector. | |
| bool | equals (StringRef RHS) const |
| bool | equals_lower (StringRef RHS) const |
| Check for string equality, ignoring case. | |
| int | compare (StringRef RHS) const |
| int | compare_lower (StringRef RHS) const |
| compare_lower - Compare two strings, ignoring case. | |
| int | compare_numeric (StringRef RHS) const |
| bool | startswith (StringRef Prefix) const |
startswith - Check if this string starts with the given Prefix. | |
| bool | endswith (StringRef Suffix) const |
endswith - Check if this string ends with the given Suffix. | |
| size_t | find (char C, size_t From=0) const |
| size_t | find (StringRef Str, size_t From=0) const |
| size_t | rfind (char C, size_t From=StringRef::npos) const |
| size_t | rfind (StringRef Str) const |
| size_t | find_first_of (char C, size_t From=0) const |
| size_t | find_first_of (StringRef Chars, size_t From=0) const |
| size_t | find_first_not_of (char C, size_t From=0) const |
| size_t | find_first_not_of (StringRef Chars, size_t From=0) const |
| size_t | find_last_of (char C, size_t From=StringRef::npos) const |
| size_t | find_last_of (StringRef Chars, size_t From=StringRef::npos) const |
| size_t | count (char C) const |
Return the number of occurrences of C in the string. | |
| size_t | count (StringRef Str) const |
| StringRef | substr (size_t Start, size_t N=StringRef::npos) const |
| StringRef | slice (size_t Start, size_t End) const |
| StringRef | str () const |
| Explicit conversion to StringRef. | |
| const char * | c_str () |
| operator StringRef () const | |
| Implicit conversion to StringRef. | |
| const SmallString & | operator= (StringRef RHS) |
| SmallString & | operator+= (StringRef RHS) |
| SmallString & | operator+= (char C) |
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better as a string (e.g. operator+ etc).
Definition at line 25 of file SmallString.h.
| llvm::SmallString< InternalLen >::SmallString | ( | ) | [inline] |
Default ctor - Initialize to empty.
Definition at line 28 of file SmallString.h.
| llvm::SmallString< InternalLen >::SmallString | ( | StringRef | S | ) | [inline] |
Initialize from a StringRef.
Definition at line 31 of file SmallString.h.
| llvm::SmallString< InternalLen >::SmallString | ( | ItTy | S, |
| ItTy | E | ||
| ) | [inline] |
Initialize with a range.
Definition at line 35 of file SmallString.h.
| void llvm::SmallString< InternalLen >::append | ( | in_iter | S, |
| in_iter | E | ||
| ) | [inline] |
Append from an iterator pair.
Reimplemented from llvm::SmallVectorImpl< char >.
Definition at line 70 of file SmallString.h.
Referenced by llvm::SmallString< 256 >::append(), llvm::SmallString< 256 >::assign(), mangleCoveragePath(), and parseBackslash().
| void llvm::SmallString< InternalLen >::append | ( | size_t | NumInputs, |
| char | Elt | ||
| ) | [inline] |
Definition at line 74 of file SmallString.h.
| void llvm::SmallString< InternalLen >::append | ( | StringRef | RHS | ) | [inline] |
Append from a StringRef.
Definition at line 80 of file SmallString.h.
| void llvm::SmallString< InternalLen >::append | ( | const SmallVectorImpl< char > & | RHS | ) | [inline] |
Append from a SmallVector.
Definition at line 85 of file SmallString.h.
| void llvm::SmallString< InternalLen >::assign | ( | size_t | NumElts, |
| char | Elt | ||
| ) | [inline] |
Assign from a repeated element.
Definition at line 43 of file SmallString.h.
Referenced by llvm::SmallString< 256 >::assign().
| void llvm::SmallString< InternalLen >::assign | ( | in_iter | S, |
| in_iter | E | ||
| ) | [inline] |
Assign from an iterator pair.
Definition at line 49 of file SmallString.h.
| void llvm::SmallString< InternalLen >::assign | ( | StringRef | RHS | ) | [inline] |
Assign from a StringRef.
Definition at line 55 of file SmallString.h.
| void llvm::SmallString< InternalLen >::assign | ( | const SmallVectorImpl< char > & | RHS | ) | [inline] |
Assign from a SmallVector.
Definition at line 61 of file SmallString.h.
| const char* llvm::SmallString< InternalLen >::c_str | ( | ) | [inline] |
Definition at line 256 of file SmallString.h.
Referenced by llvm::LTOCodeGenerator::compile_to_file(), llvm::LockFileManager::LockFileManager(), parseDouble(), llvm::cl::TokenizeGNUCommandLine(), and llvm::cl::TokenizeWindowsCommandLine().
| int llvm::SmallString< InternalLen >::compare | ( | StringRef | RHS | ) | const [inline] |
Compare two strings; the result is -1, 0, or 1 if this string is lexicographically less than, equal to, or greater than the RHS.
Definition at line 104 of file SmallString.h.
| int llvm::SmallString< InternalLen >::compare_lower | ( | StringRef | RHS | ) | const [inline] |
compare_lower - Compare two strings, ignoring case.
Definition at line 109 of file SmallString.h.
| int llvm::SmallString< InternalLen >::compare_numeric | ( | StringRef | RHS | ) | const [inline] |
compare_numeric - Compare two strings, treating sequences of digits as numbers.
Definition at line 115 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::count | ( | char | C | ) | const [inline] |
Return the number of occurrences of C in the string.
Definition at line 211 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::count | ( | StringRef | Str | ) | const [inline] |
Return the number of non-overlapped occurrences of Str in the string.
Definition at line 217 of file SmallString.h.
| bool llvm::SmallString< InternalLen >::endswith | ( | StringRef | Suffix | ) | const [inline] |
endswith - Check if this string ends with the given Suffix.
Definition at line 127 of file SmallString.h.
| bool llvm::SmallString< InternalLen >::equals | ( | StringRef | RHS | ) | const [inline] |
Check for string equality. This is more efficient than compare() when the relative ordering of inequal strings isn't needed.
Definition at line 93 of file SmallString.h.
| bool llvm::SmallString< InternalLen >::equals_lower | ( | StringRef | RHS | ) | const [inline] |
Check for string equality, ignoring case.
Definition at line 98 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find | ( | char | C, |
| size_t | From = 0 |
||
| ) | const [inline] |
find - Search for the first character C in the string.
C, or npos if not found. Definition at line 137 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find | ( | StringRef | Str, |
| size_t | From = 0 |
||
| ) | const [inline] |
Search for the first string Str in the string.
Str, or npos if not found. Definition at line 145 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find_first_not_of | ( | char | C, |
| size_t | From = 0 |
||
| ) | const [inline] |
Find the first character in the string that is not C or npos if not found.
Definition at line 181 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find_first_not_of | ( | StringRef | Chars, |
| size_t | From = 0 |
||
| ) | const [inline] |
Find the first character in the string that is not in the string Chars, or npos if not found.
Complexity: O(size() + Chars.size())
Definition at line 189 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find_first_of | ( | char | C, |
| size_t | From = 0 |
||
| ) | const [inline] |
Find the first character in the string that is C, or npos if not found. Same as find.
Definition at line 167 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find_first_of | ( | StringRef | Chars, |
| size_t | From = 0 |
||
| ) | const [inline] |
Find the first character in the string that is in Chars, or npos if not found.
Complexity: O(size() + Chars.size())
Definition at line 175 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find_last_of | ( | char | C, |
| size_t | From = StringRef::npos |
||
| ) | const [inline] |
Find the last character in the string that is C, or npos if not found.
Definition at line 195 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::find_last_of | ( | StringRef | Chars, |
| size_t | From = StringRef::npos |
||
| ) | const [inline] |
Find the last character in the string that is in C, or npos if not found.
Complexity: O(size() + Chars.size())
Definition at line 203 of file SmallString.h.
| llvm::SmallString< InternalLen >::operator StringRef | ( | ) | const [inline] |
Implicit conversion to StringRef.
Definition at line 263 of file SmallString.h.
| SmallString& llvm::SmallString< InternalLen >::operator+= | ( | StringRef | RHS | ) | [inline] |
Definition at line 271 of file SmallString.h.
| SmallString& llvm::SmallString< InternalLen >::operator+= | ( | char | C | ) | [inline] |
Definition at line 275 of file SmallString.h.
| const SmallString& llvm::SmallString< InternalLen >::operator= | ( | StringRef | RHS | ) | [inline] |
Definition at line 266 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::rfind | ( | char | C, |
| size_t | From = StringRef::npos |
||
| ) | const [inline] |
Search for the last character C in the string.
C, or npos if not found. Definition at line 153 of file SmallString.h.
| size_t llvm::SmallString< InternalLen >::rfind | ( | StringRef | Str | ) | const [inline] |
Search for the last string Str in the string.
Str, or npos if not found. Definition at line 161 of file SmallString.h.
| StringRef llvm::SmallString< InternalLen >::slice | ( | size_t | Start, |
| size_t | End | ||
| ) | const [inline] |
Return a reference to the substring from [Start, End).
| Start | The index of the starting character in the substring; if the index is npos or greater than the length of the string then the empty substring will be returned. |
| End | The index following the last character to include in the substring. If this is npos, or less than Start, or exceeds the number of characters remaining in the string, the string suffix (starting with Start) will be returned. |
Definition at line 246 of file SmallString.h.
| bool llvm::SmallString< InternalLen >::startswith | ( | StringRef | Prefix | ) | const [inline] |
startswith - Check if this string starts with the given Prefix.
Definition at line 122 of file SmallString.h.
| StringRef llvm::SmallString< InternalLen >::str | ( | ) | const [inline] |
Explicit conversion to StringRef.
Definition at line 253 of file SmallString.h.
Referenced by llvm::SmallString< 256 >::c_str(), llvm::SmallString< 256 >::compare(), llvm::SmallString< 256 >::compare_lower(), llvm::SmallString< 256 >::compare_numeric(), llvm::SmallString< 256 >::count(), CrashHandler(), llvm::createGraphFilename(), llvm::APInt::dump(), emitComments(), llvm::StringToOffsetTable::EmitString(), llvm::SmallString< 256 >::endswith(), llvm::SmallString< 256 >::equals_lower(), llvm::SmallString< 256 >::find(), llvm::SmallString< 256 >::find_first_not_of(), llvm::SmallString< 256 >::find_first_of(), llvm::SmallString< 256 >::find_last_of(), llvm::sys::Process::FindInEnvPath(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::LineEditor::getDefaultHistoryPath(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::DWARFDebugLine::LineTable::getFileNameByIndex(), getFileNameForUnit(), llvm::getFnSpecificMDNode(), llvm::jitprofiling::FilenameCache::getFullPath(), llvm::MachineFunction::getJTISymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), llvm::MCContext::getMachOSection(), llvm::getOrInsertFnSpecificMDNode(), llvm::TargetMachine::getSymbol(), GetSymbolFromOperand(), llvm::LockFileManager::LockFileManager(), llvm::MCContext::LookupSymbol(), mangleCoveragePath(), llvm::object::ExportEntry::name(), llvm::SmallString< 256 >::operator+=(), llvm::object::ExportEntry::operator==(), llvm::APInt::print(), llvm::SmallString< 256 >::rfind(), llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal(), llvm::Triple::setArchName(), llvm::FileRemover::setFile(), llvm::SmallString< 256 >::slice(), llvm::APInt::toString(), llvm::LockFileManager::waitForUnlock(), llvm::WriteConstantInternal(), writeFragment(), llvm::MachObjectWriter::WriteObject(), llvm::FileRemover::~FileRemover(), and llvm::LockFileManager::~LockFileManager().
| StringRef llvm::SmallString< InternalLen >::substr | ( | size_t | Start, |
| size_t | N = StringRef::npos |
||
| ) | const [inline] |
Return a reference to the substring from [Start, Start + N).
| Start | The index of the starting character in the substring; if the index is npos or greater than the length of the string then the empty substring will be returned. |
| N | The number of characters to included in the substring. If N exceeds the number of characters remaining in the string, the string suffix (starting with Start) will be returned. |
Definition at line 232 of file SmallString.h.
Referenced by llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().