bstring 1.1.0
Loading...
Searching...
No Matches
utf8util.h File Reference

Interface for low-level UTF-8 utility functions. More...

#include <limits.h>

Go to the source code of this file.

Data Structures

struct  utf8Iterator

Macros

#define BSTR_PUBLIC
#define isLegalUnicodeCodePoint(v)
#define utf8IteratorNoMore(it)

Functions

BSTR_PUBLIC void utf8IteratorInit (struct utf8Iterator *iter, unsigned char *data, int slen)
BSTR_PUBLIC void utf8IteratorUninit (struct utf8Iterator *iter)
BSTR_PUBLIC cpUcs4 utf8IteratorGetNextCodePoint (struct utf8Iterator *iter, cpUcs4 errCh)
BSTR_PUBLIC cpUcs4 utf8IteratorGetCurrCodePoint (struct utf8Iterator *iter, cpUcs4 errCh)
BSTR_PUBLIC int utf8ScanBackwardsForCodePoint (const unsigned char *msg, int len, int pos, cpUcs4 *out)

Detailed Description

Interface for low-level UTF-8 utility functions.

This module is standalone and does not depend on bstrlib.

Macro Definition Documentation

◆ isLegalUnicodeCodePoint

#define isLegalUnicodeCodePoint ( v)
Value:
((((v) < 0xD800L) || ((v) > 0xDFFFL)) && \
(((unsigned long)(v)) <= 0x0010FFFFL) && \
(((v)|0x1F0001) != 0x1FFFFFL))

◆ utf8IteratorNoMore

#define utf8IteratorNoMore ( it)
Value:
(!(it) || (it)->next >= (it)->slen)