|
Str View
|
A read-only view of string data in C. More...
#include <str_view.h>
A read-only view of string data in C.
It is modeled after the C++ std::string_view. It consists of a pointer to char const data and a size_t field. Therefore, the exact size of this type may be platform dependent but it is small enough that one should use the provided functions and pass by copy whenever possible. Avoid accessing struct fields.
Data Fields | |
| char const * | str |
| size_t | len |
| size_t SV_Str_view::len |
The length, not including the NULL terminator position. However, it is possible that a view is not NULL terminated at that position.
| char const* SV_Str_view::str |
The read only data to which we point.