LumaOS  v0.1.116
An experimental x86-64 OS
Loading...
Searching...
No Matches
parser.h
Go to the documentation of this file.
1
9#ifndef KERNEL_LIB_PARSER_H
10#define KERNEL_LIB_PARSER_H
11#include <stdbool.h>
12#include <stdint.h>
13#include <stddef.h>
14
21bool parse_flag(const char *flag, const char *str);
22
29bool parse_bool(const char *flag, const char *str);
30
37long parse_int(const char *flag, const char *str);
38
39bool parse_string(const char *flag, const char *str, char *out, size_t out_size);
40
41#endif
bool parse_bool(const char *flag, const char *str)
Checks if a flag is present in a string and if its set to true or false.
Definition parser.c:83
bool parse_flag(const char *flag, const char *str)
Checks if a flag is present in a string.
Definition parser.c:76
long parse_int(const char *flag, const char *str)
Gets the int value of a flag.
Definition parser.c:133