aboutsummaryrefslogtreecommitdiff
path: root/utf8.h
blob: 243acd33b7e8ca59f9c5b04f84b168b09dd7a6fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// utf8.h - UTF8 helper functions
//
#ifndef UTF8__H
#define UTF8__H

#include <stdbool.h>

#define UTF8_MAXCHARLEN 4

__attribute__((nonnull, pure))
const char *next_char(const char *str, const char *end);
__attribute__((nonnull, pure))
const char *prev_char(const char *start, const char *str);
__attribute__((nonnull, pure))
bool isidstart(const char *str, const char *end);
__attribute__((nonnull, pure))
bool isidcontinue(const char *str, const char *end);

#endif
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0