C Workshop
SearchEnvironment.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Functions

void SearchEnvironment (char *envp[], char *search)
 Prints the environment variables starting with the given search term using the format: More...
 
bool StartsWith (char *string, char *search)
 Checks if a string starts with the text of search. More...
 

Function Documentation

◆ SearchEnvironment()

void SearchEnvironment ( char *  envp[],
char *  search 
)

Prints the environment variables starting with the given search term using the format:

'Environment variable "PROCESSOR_ARCHITECTURE" has the value "AMD64".'

Parameters
envpThe environment variables.
searchThe text to search for.

◆ StartsWith()

bool StartsWith ( char *  string,
char *  search 
)

Checks if a string starts with the text of search.

Parameters
stringThe string to check.
searchThe text to search for.
Returns
true if the string starts with the text of search, false otherwise.