get_parameter()#
get_parameter() extracts a parameter from a string, delimited by blanks (' ' or ' ') or quotes (' or "). The input string is modified by inserting null terminators.
Prototype
char *get_parameter(
char *s,
char **save_ptr
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
The input string to parse. It is modified in-place. |
|
|
Pointer to store the next position in the string for subsequent calls. |
Return Value
Returns a pointer to the extracted parameter, or NULL if no parameter is found.
Notes
If the parameter is enclosed in quotes (' or "), the function ensures that the returned string does not include them.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples