mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-21 20:40:10 +00:00
strings/json: Add string delimter match, and object create with vars methods
Add a function to check if there is an exact match a one string between delimiters in another string. Add a function that will create an ast_json object out of a list of Asterisk variables. An excludes string can also optionally be passed in. Also, add a macro to make it easier to get object integers. Change-Id: I5f34f18e102126aef3997f19a553a266d70d6226
This commit is contained in:
committed by
Friendly Automation
parent
ba3f6c0b1e
commit
ed384e652c
@@ -400,6 +400,19 @@ void ast_copy_string(char *dst, const char *src, size_t size),
|
||||
}
|
||||
)
|
||||
|
||||
/*!
|
||||
* \brief Check if there is an exact match for 'needle' between delimiters in 'haystack'.
|
||||
*
|
||||
* \note This will skip extra leading spaces between delimiters.
|
||||
*
|
||||
* \param needle The string to search for
|
||||
* \param haystack The string searched in
|
||||
* \param delim The haystack delimiter
|
||||
*
|
||||
* \return True if an exact match for needle is in haystack, false otherwise
|
||||
*/
|
||||
int ast_in_delimited_string(const char *needle, const char *haystack, char delim);
|
||||
|
||||
/*!
|
||||
\brief Build a string in a buffer, designed to be called repeatedly
|
||||
|
||||
|
Reference in New Issue
Block a user