code / bp

Lines4.3K C3.3K Markdown541 YAML273 make110 Shell77 Lua54
(15 lines)
1 //
2 // utf8.h - UTF8 helper functions
3 //
4 #pragma once
6 #include <stdbool.h>
8 #define UTF8_MAXCHARLEN 4
10 __attribute__((nonnull, pure)) const char *next_char(const char *str, const char *end);
11 __attribute__((nonnull, pure)) const char *prev_char(const char *start, const char *str);
12 __attribute__((nonnull, pure)) bool isidstart(const char *str, const char *end);
13 __attribute__((nonnull, pure)) bool isidcontinue(const char *str, const char *end);
15 // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0