class StringWriter
Defined at line 384 of file ../../third_party/openthread/src/core/common/string.hpp
Implements writing to a string buffer.
Public Methods
void StringWriter (char * aBuffer, uint16_t aSize)
Initializes the object as cleared on the provided buffer.
Parameters
StringWriter & Clear ()
Clears the string writer.
StringWriter & Append (const char * aFormat)
Appends `printf()` style formatted data to the buffer.
Parameters
StringWriter & AppendVarArgs (const char * aFormat, va_list aArgs)
Appends `printf()` style formatted data to the buffer.
Parameters
StringWriter & AppendHexBytes (const uint8_t * aBytes, uint16_t aLength)
Appends an array of bytes in hex representation (using "%02x" style) to the buffer.
Parameters
StringWriter & AppendCharMultipleTimes (char aChar, uint16_t aCount)
Appends a given character a given number of times.
Parameters
bool IsTruncated ()
Returns whether the output is truncated.
Defined at line 410 of file ../../third_party/openthread/src/core/common/string.hpp
uint16_t GetLength ()
Gets the length of the wanted string.
Similar to `strlen()` the length does not include the null character at the end of the string.
Defined at line 419 of file ../../third_party/openthread/src/core/common/string.hpp
uint16_t GetSize ()
Returns the size (number of chars) in the buffer.
Defined at line 426 of file ../../third_party/openthread/src/core/common/string.hpp
void ConvertToLowercase ()
Converts all uppercase letter characters in the string to lowercase.
Defined at line 469 of file ../../third_party/openthread/src/core/common/string.hpp
void ConvertToUppercase ()
Converts all lowercase letter characters in the string to uppercase.
Defined at line 474 of file ../../third_party/openthread/src/core/common/string.hpp