962 B
962 B
utils.h
Include Guard
#ifndef UTILS_H
# define UTILS_H
# include <stdint.h>
# include <stdio.h>
Functions
read_line
Get a line from a file.
char *
read_line(FILE *f);
starts_with
Check if a string starts with a given prefix.
int8_t
starts_with(const char *str, const char *prefix);
extract_fence_ext
Extract the extension from a fence string.
char *
extract_fence_ext(const char *fence);
extract_file_ext
Extract the file extension from a file path.
const char *
extract_file_ext(const char *path);
infer_ext_from_filename
Infer the file extension from a filename.
const char *
infer_ext_from_filename(const char *path);
End Guard
#endif