Return a reference to the substring from [Start, End).]
Declared in <llvm/ADT/StringRef.h>
[[nodiscard]]
StringRef
slice(
size_t Start,
size_t End) const;
Substring covering characters in [Start, End).]
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. |
| End | The index following the last character to include in the substring. If this is npos or exceeds the number of characters remaining in the string, the string suffix (starting with Start) will be returned. If this is less than Start, an empty string will be returned. |