Function anj_string_to_double_value

Function Documentation

int anj_string_to_double_value(double *out_val, const char *buff, size_t buff_len)

Parse a decimal string into double (no inf / nan support, consistent with LwM2M attribute representation).

Note

The input string is not required to be null-terminated. The caller must explicitly provide the length in buff_len (e.g., using strlen() if the content is null-terminated).

Returns:

0 on success, -1 on error (empty input, invalid characters, etc.).