libexpress 0.0.1
Express Server Framework in C
|
This contains all the utilities used through the library. More...
#include <libcol/col.h>
Go to the source code of this file.
Functions | |
void | print_info (const char *msg, color_t color, bool exit_process, bool print_line, const char *file, int line) |
An internal function used by error, warning and success to print the messages, along with necessary elements like line number or file name and even the option to exit out of the process with an exit(1) More... | |
char * | tokenize (char *s, char c) |
This splits the string s at the first occurence of character c in s. More... | |
This contains all the utilities used through the library.
void print_info | ( | const char * | msg, |
color_t | color, | ||
bool | exit_process, | ||
bool | print_line, | ||
const char * | file, | ||
int | line | ||
) |
An internal function used by error, warning and success to print the messages, along with necessary elements like line number or file name and even the option to exit out of the process with an exit(1)
Please don't use this outside of util.c
char * tokenize | ( | char * | s, |
char | c | ||
) |
This splits the string s at the first occurence of character c in s.
Then s becomes the original string till that character, while the returned value points to the string that was split from it. It can be used like this:
char s[] = "hello world foo bye";
char *k = tokenize(s, ' ');
now s is "hello" while k is "world foo bye"
s | |
c |