Minishell
Loading...
Searching...
No Matches
utils.h File Reference
#include "main.h"
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * trim (char *s)
 
int my_strlen (char *str)
 
char * my_strdup (char *src)
 
int count_line (char *path)
 
char * my_strchr (char *str, int c)
 
int my_strcmp (char *s1, char *s2)
 
void free_word_array (char **array)
 
char * seconds_to_time (int seconds)
 
char * my_strcat (char *s1, char *s2)
 
void remove_n_chars (char *str, int n)
 
char ** my_str_to_word_array (char *str)
 
char * my_strcpy (char *dest, char *src)
 
char ** linked_list_to_array (data_t *data)
 
char * my_strtok (char *input_str, const char *delimiter)
 
void print_elapsed_time (struct timespec *start, struct timespec *end)
 

Function Documentation

◆ count_line()

int count_line ( char * path)

◆ free_word_array()

void free_word_array ( char ** array)

◆ linked_list_to_array()

char ** linked_list_to_array ( data_t * data)

Convert the linked list of env variables to an array of strings

Parameters
dataGlobal data structure
Returns
returns the array of strings or NULL if there was an error

◆ my_str_to_word_array()

char ** my_str_to_word_array ( char * str)
Here is the call graph for this function:

◆ my_strcat()

char * my_strcat ( char * s1,
char * s2 )
Here is the call graph for this function:

◆ my_strchr()

char * my_strchr ( char * str,
int c )

◆ my_strcmp()

int my_strcmp ( char * s1,
char * s2 )

◆ my_strcpy()

char * my_strcpy ( char * dest,
char * src )

◆ my_strdup()

char * my_strdup ( char * src)
Here is the call graph for this function:

◆ my_strlen()

int my_strlen ( char * str)

◆ my_strtok()

char * my_strtok ( char * input_str,
const char * delimiter )

◆ print_elapsed_time()

void print_elapsed_time ( struct timespec * start,
struct timespec * end )

◆ remove_n_chars()

void remove_n_chars ( char * str,
int n )

◆ seconds_to_time()

char * seconds_to_time ( int seconds)

◆ trim()

char * trim ( char * s)
Here is the call graph for this function: