Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Functions | |
int | settings_name_steq (const char *name, const char *key, const char **next) |
Compares the start of name with a key. | |
int | settings_name_next (const char *name, const char **next) |
determine the number of characters before the first separator | |
API for const name processing
int settings_name_next | ( | const char * | name, |
const char ** | next ) |
#include <zephyr/settings/settings.h>
determine the number of characters before the first separator
[in] | name | in string format |
[out] | next | pointer to remaining of name (excluding separator) |
int settings_name_steq | ( | const char * | name, |
const char * | key, | ||
const char ** | next ) |
#include <zephyr/settings/settings.h>
Compares the start of name with a key.
[in] | name | in string format |
[in] | key | comparison string |
[out] | next | pointer to remaining of name, when the remaining part starts with a separator the separator is removed from next |
Some examples: settings_name_steq("bt/btmesh/iv", "b", &next) returns 1, next="t/btmesh/iv" settings_name_steq("bt/btmesh/iv", "bt", &next) returns 1, next="btmesh/iv" settings_name_steq("bt/btmesh/iv", "bt/", &next) returns 0, next=NULL settings_name_steq("bt/btmesh/iv", "bta", &next) returns 0, next=NULL
REMARK: This routine could be simplified if the settings_handler names would include a separator at the end.