#ifndef BDL_STRINGVIEW_H #define BDL_STRINGVIEW_H typedef struct StringView { char *start; size_t n; } StringView; // Consume a character in the stream. char sv_next(StringView *sv); // Check what is the current character in the stream. char sv_peek(const StringView *sv); // Compare if the arguments are the same. bool sv_equal(const StringView *a, const StringView *b); // Write a character to the given output stream. void sv_write(const StringView *sv, FILE *file); #endif // BDL_STRINGVIEW_H