Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_string_ref.hh
| Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | constexpr const char *begin() const | ||||
| return data_; | return data_; | ||||
| } | } | ||||
| constexpr const char *end() const | constexpr const char *end() const | ||||
| { | { | ||||
| return data_ + size_; | return data_ + size_; | ||||
| } | } | ||||
| constexpr 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 | * 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 | * string, because the copied string will be null-terminated. Only use this when you are | ||||
| * absolutely sure that the buffer is large enough. | * absolutely sure that the buffer is large enough. | ||||
| */ | */ | ||||
| void unsafe_copy(char *dst) const | void unsafe_copy(char *dst) const | ||||
| { | { | ||||
| memcpy(dst, data_, static_cast<size_t>(size_)); | memcpy(dst, data_, static_cast<size_t>(size_)); | ||||
| ▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines | |||||