|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
#include <span.hpp>
Public Member Functions | |
| constexpr const char * | begin () const |
| Iterator to the first byte. | |
| constexpr const char * | data () const |
| Pointer to the underlying bytes. | |
| constexpr bool | empty () const |
| True if the view contains zero bytes. | |
| constexpr const char * | end () const |
| Iterator past the last byte. | |
| bool | equals (const char *cstr) const |
True if cstr (null-terminated) has the same length and bytes. | |
| constexpr char | operator[] (size_t i) const |
| Byte access; no bounds check. | |
| constexpr size_t | size () const |
| Number of bytes. | |
Public Attributes | |
| size_t | len |
| Number of bytes in the view. | |
| const char * | ptr |
| Pointer to the first byte. Not null-terminated. | |
Non-owning view over a UTF-8 string (not null-terminated).
Same semantics as std::string_view but requires only C++14. The data pointer is valid only for the lifetime of the source buffer.
|
inlineconstexpr |
Iterator to the first byte.
|
inlineconstexpr |
Pointer to the underlying bytes.
|
inlineconstexpr |
True if the view contains zero bytes.
|
inlineconstexpr |
Iterator past the last byte.
|
inline |
True if cstr (null-terminated) has the same length and bytes.
|
inlineconstexpr |
Byte access; no bounds check.
|
inlineconstexpr |
Number of bytes.
| size_t nros::StringView::len |
Number of bytes in the view.
| const char* nros::StringView::ptr |
Pointer to the first byte. Not null-terminated.