Zappy - Year end project 2
This is a project that Epitech asked us to create in order to allow us to reveiw the notions of the current year.
Loading...
Searching...
No Matches
Functions
parameter_utils.c File Reference
#include <string.h>
#include "arg_parse.h"
Include dependency graph for parameter_utils.c:

Go to the source code of this file.

Functions

int is_param (const char *str, const struct option_list_s *opt_list)
 Check if a string is a parameter.
 
int get_nb_parameter (int ac, const char **av)
 Get the number of parameter passed to the program.
 

Function Documentation

◆ get_nb_parameter()

int get_nb_parameter ( int ac,
const char ** av )

Get the number of parameter passed to the program.

Parameters
acNumber of arguments
avVariables passed as parameter to the program
Returns
The number of parameter passed to the program

Definition at line 38 of file parameter_utils.c.

◆ is_param()

int is_param ( const char * str,
const struct option_list_s * opt_list )

Check if a string is a parameter.

Parameters
strThe string to check
opt_listThe constant defined with every known command
Returns
The index of the parameter in the constants, (-1) if not found

Definition at line 12 of file parameter_utils.c.