BLI: add index_range method for StringRef

This commit is contained in:
Jacques Lucke 2020-09-03 16:13:34 +02:00
parent e7d3d0219b
commit 519b2f937f
1 changed files with 5 additions and 0 deletions

View File

@ -122,6 +122,11 @@ class StringRefBase {
return data_ + size_;
}
IndexRange index_range() const
{
return IndexRange(size_);
}
/**
* Copy the string into a buffer. The buffer has to be one byte larger than the size of the
* string, because the copied string will be null-terminated. Only use this when you are