php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
utf7_helper.h
Go to the documentation of this file.
1#ifndef MBFL_UTF7_HELPER_H
2#define MBFL_UTF7_HELPER_H
3
4#include "mbfilter.h"
5
6/* Ways which a Base64-encoded section can end: */
7#define DASH 0xFC
8#define DIRECT 0xFD
9#define ASCII 0xFE
10#define ILLEGAL 0xFF
11
12static inline bool is_base64_end_valid(unsigned char n, bool gap, bool is_surrogate)
13{
14 return !(gap || is_surrogate || n == ASCII || n == ILLEGAL);
15}
16
17static inline bool has_surrogate(uint16_t cp, bool is_surrogate)
18{
19 return !is_surrogate && cp >= 0xD800 && cp <= 0xDBFF;
20}
21
22#endif /* MBFL_UTF7_HELPER_H */
zend_long n
Definition ffi.c:4979
#define ASCII
Definition gdkanji.c:46
#define ILLEGAL
Definition utf7_helper.h:10