Return a reference to the substring from [Start, Start + N).]
Declared in <llvm/ADT/StringRef.h>
[[nodiscard]]
constexpr
StringRef
substr(
size_t Start,
size_t N = npos) const;
Substring covering at most N characters from Start.
The return value should not be discarded.
| Name | Description |
|---|---|
| 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. |