#include <fixed_string.hpp>
|
| const char * | c_str () const |
| | Get a pointer to the null-terminated string.
|
| bool | empty () const |
| | True when the string holds no characters. phase-417 W1.c; ungated.
|
| | FixedString () |
| | Default constructor — empty string.
|
| size_t | length () const |
| | Get the length of the string (up to N-1).
|
| bool | operator!= (const char *s) const |
| FixedString & | operator= (const char *s) |
| | Assign from a C string. Truncates if longer than capacity.
|
| bool | operator== (const char *s) const |
| | Compare with a C string.
|
| size_t | size () const |
|
| static constexpr size_t | capacity () |
| | Maximum number of characters (excluding null terminator).
|
template<size_t N>
struct rclcpp::FixedString< N >
Fixed-capacity null-terminated string.
Wraps a char[N] buffer with safe assignment and query methods. Memory layout is identical to char[N], so the type is C-ABI compatible and can be passed across the runtime boundary by value.
Usage:
name = "hello world";
Definition fixed_string.hpp:39
const char * c_str() const
Get a pointer to the null-terminated string.
Definition fixed_string.hpp:60
size_t length() const
Get the length of the string (up to N-1).
Definition fixed_string.hpp:63
◆ FixedString()
Default constructor — empty string.
◆ c_str()
Get a pointer to the null-terminated string.
◆ capacity()
Maximum number of characters (excluding null terminator).
◆ empty()
True when the string holds no characters. phase-417 W1.c; ungated.
◆ length()
Get the length of the string (up to N-1).
◆ operator!=()
◆ operator=()
Assign from a C string. Truncates if longer than capacity.
◆ operator==()
◆ size()
Number of characters, excluding the terminator — the std::string spelling of length(). phase-417 W1.c; ungated, no <string> needed.
◆ data
The documentation for this struct was generated from the following file: