rcutils  master
C API providing common utilities and data structures.
Functions
cmdline_parser.h File Reference
#include <stdbool.h>
#include "rcutils/visibility_control.h"
Include dependency graph for cmdline_parser.h:

Go to the source code of this file.

Functions

bool rcutils_cli_option_exist (char **begin, char **end, const char *option)
 Return true if the option is defined in the command line arguments or false otherwise. More...
 
char * rcutils_cli_get_option (char **begin, char **end, const char *option)
 Return the value for a specific option of the command line arguments. More...
 

Function Documentation

◆ rcutils_cli_option_exist()

bool rcutils_cli_option_exist ( char **  begin,
char **  end,
const char *  option 
)

Return true if the option is defined in the command line arguments or false otherwise.

Parameters
[in]beginfirst element to check in the array
[in]endlast element to check in the array
[in]optionstring to find in the array of arguments
Returns
if the option exists returns true, otherwise returns false.

◆ rcutils_cli_get_option()

char* rcutils_cli_get_option ( char **  begin,
char **  end,
const char *  option 
)

Return the value for a specific option of the command line arguments.

Parameters
[in]beginfirst element to check in the array
[in]endlast element to check in the array
[in]optionstring to find in the array of arguments
Returns
the value for a specific option of the command line arguments or NULL if the option doesn't exist