|
unilink
0.4.3
A simple C++ library for unified async communication
|
Functions | |
| std::string | uint8_to_string (const uint8_t *data, size_t size) |
| Safely convert uint8_t* to const char* for string operations. More... | |
| std::vector< uint8_t > | string_to_uint8 (const char *data, size_t size) |
| Safely convert const char* to const uint8_t* for binary operations. More... | |
| std::vector< uint8_t > | string_to_uint8 (std::string_view str) |
| Safely convert std::string to std::vector<uint8_t> More... | |
| std::pair< const uint8_t *, size_t > | string_to_bytes (std::string_view str) |
| Safely obtain a view of std::string as byte array without allocation. More... | |
|
inline |
Safely obtain a view of std::string as byte array without allocation.
| str | The string to convert |
Definition at line 180 of file common.hpp.
|
inline |
Safely convert const char* to const uint8_t* for binary operations.
| data | Pointer to char data |
| size | Size of the data |
Definition at line 159 of file common.hpp.
|
inline |
Safely convert std::string to std::vector<uint8_t>
| str | The string to convert |
Definition at line 171 of file common.hpp.
|
inline |
Safely convert uint8_t* to const char* for string operations.
| data | Pointer to uint8_t data |
| size | Size of the data |
Definition at line 146 of file common.hpp.