httpd/src/utils/parsing/blanks.h
2026-06-24 16:56:11 +02:00

39 lines
656 B
C

#ifndef BLANKS_H
#define BLANKS_H
// === Definitions
#define BLANKS_LIST "\f\n\r\t\v "
// === Includes
#include <stdbool.h>
#include <stddef.h>
#include <sys/types.h>
#include "../string/string.h"
// === Functions
/*
* NOTE:
* As ispace(3) and isblank(3) functions from stdlib can be confusing and not
* always best suited for what I want to do, I decided to reimplement them.
* So be warned, they won't have the same behavior as their libc counterparts.
*/
/*
* Doc: TODO
*/
bool is_space(char c);
/*
* Doc: TODO
*/
bool is_blank(char c);
/*
* Doc: TODO
*/
ssize_t skip_blanks(struct string *str, size_t offset);
#endif // ! BLANKS_H