MIP_SDK  v3.0.0-736-g212583cf
MicroStrain Communications Library for embedded systems
Functions | Variables
strings.c File Reference
#include "strings.h"
#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>

Functions

bool microstrain_string_concat (char *buffer, size_t buffer_size, size_t *index, const char *str, size_t str_len)
 Concatenate a string into a buffer. More...
 
bool microstrain_string_concat_z (char *buffer, size_t buffer_size, size_t *index, const char *str)
 Concatenate a string into a buffer. More...
 
bool microstrain_string_format_v (char *buffer, size_t buffer_size, size_t *index, const char *fmt, va_list args)
 Wrapper for std::vsnprintf with a better interface. More...
 
bool microstrain_string_format (char *buffer, size_t buffer_size, size_t *index, const char *fmt,...)
 Wrapper for std::snprintf with a better interface. More...
 
static char nibble_to_hex_char (uint8_t value)
 
bool microstrain_string_bytes_to_hex_str (char *buffer, size_t buffer_size, size_t *index, const uint8_t *data, size_t data_size, unsigned int byte_grouping)
 Formats a byte array to a text buffer in hexadecimal. More...
 

Variables

static const char NIBBLE_HEX_TABLE [16]
 

Function Documentation

◆ nibble_to_hex_char()

static char nibble_to_hex_char ( uint8_t  value)
static

Variable Documentation

◆ NIBBLE_HEX_TABLE

const char NIBBLE_HEX_TABLE[16]
static
Initial value:
= {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
}