From 519b2f937f3281031d8970cbfc0d26c3acf308a5 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Thu, 3 Sep 2020 16:13:34 +0200 Subject: BLI: add index_range method for StringRef --- source/blender/blenlib/BLI_string_ref.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/BLI_string_ref.hh b/source/blender/blenlib/BLI_string_ref.hh index e30eccca891..be18848fbf4 100644 --- a/source/blender/blenlib/BLI_string_ref.hh +++ b/source/blender/blenlib/BLI_string_ref.hh @@ -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 -- cgit v1.2.3