nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ util_string_get()

int util_string_get ( struct at_parser parser,
size_t  index,
char *  value,
size_t *  len 
)

Get string value from AT command with length check.

len must be bigger than the string length, or an error is returned. The copied string is null-terminated.

Parameters
[in]parserAT parser.
[in]indexParameter index in the AT parser.
[out]valuePointer to the buffer where to copy the value.
[in,out]lenAvailable space in value, returns actual length copied into string buffer in bytes, excluding the terminating null character.
Return values
0If the operation was successful. Otherwise, a (negative) error code is returned.