Embedded Wireless Framework
Functions
ewf_lib.h File Reference

Library of utility macros and low footprint functions. More...

#include "ewf.h"

Go to the source code of this file.

Functions

char * ewfl_unsigned_to_str (uint32_t u, char *str, uint32_t len)
 Converts an uint32_t to a string. More...
 
uint32_t ewfl_str_to_unsigned (const char *str)
 Parse an uint32_t from a string. More...
 
uint32_t ewfl_str_length (const char *str)
 Returns the length of the passed NULL terminated string. More...
 
bool ewfl_str_starts_with (const char *str, const char *prefix_str)
 Tests for a string start match. More...
 
bool ewfl_str_ends_with (const char *str, const char *suffix_str)
 Tests for a string end match. More...
 
bool ewfl_buffer_starts_with (const uint8_t *buffer_ptr, uint32_t buffer_length, const uint8_t *prefix_ptr, uint32_t prefix_length)
 Checks if a buffer starts with a string. More...
 
bool ewfl_buffer_ends_with (const uint8_t *buffer_ptr, uint32_t buffer_length, const uint8_t *suffix_ptr, uint32_t suffix_length)
 Checks if a buffer ends with a string. More...
 
bool ewfl_buffer_ends_with_wildcard_string (const uint8_t *buffer_ptr, uint32_t buffer_length, const uint8_t *suffix_ptr, uint32_t suffix_length)
 Checks if a buffer ends with a string containing wildcards The current version supports question marks '?'to match single characters. More...
 
bool ewfl_str_equals_str (const char *str1, const char *str2)
 Checks if two strings are equal. More...
 
bool ewfl_buffer_equals_buffer (const uint8_t *buffer1, const uint8_t *buffer2, uint32_t length)
 Checks if two buffers are equal. More...
 
bool ewfl_str_contains_str (const char *str, const char *substr)
 Searches for a string in a substring. More...
 
char * ewfl_str_n_cpy (char *dest, const char *src_str, uint32_t n)
 Copies source string to destination buffer and terminates it by NULL. More...
 
char * ewfl_str_remove_white_spaces (char *str)
 Remove leading and trailing white space characters. More...
 
char * ewfl_str_remove_suffix_str (char *str, const char *suffix_str)
 Remove suffix from string. More...
 
char * ewfl_adapter_response_str_extract (char *str)
 Parse adapter response by trimming white space and "OK". More...
 
char * ewfl_find_chars_with_terms (char *str, char *chars_str, char *term_str)
 Find the next matching character from several of many in a string, break and fail on matching custom terminators. More...
 
char * ewfl_str_tok (char *str, const char *delim, char **saveptr)
 Wrapper function with functionality equivalent to strtok_s / strtok_r. More...
 

Detailed Description

Library of utility macros and low footprint functions.

Version
Preview