BLI: add high level documentation for core data structures #25

Merged
Jacques Lucke merged 14 commits from JacquesLucke/blender-developer-docs:core-data-structures into main 2024-02-19 19:09:34 +01:00
Showing only changes of commit 4547fac8e3 - Show all commits

View File

@ -1,3 +1,3 @@
# Strings
`std::string`, `StringRef`, `StringRefNull`
Blender usually stores strings as `std::string`. If strings are passed around without transfering ownership `blender::StringRef` ([source](https://projects.blender.org/blender/blender/src/branch/main/source/blender/blenlib/BLI_string_ref.hh)) should be used. `StringRef` is a non-owning slice of a string. It's just a pointer and a size and should generally be passed around by value. If a string with null-termination is required, `StringRefNull` should be used instead.