32 #ifndef _QORE_INTERN_QORE_ENCODING_PRIVATE_H
33 #define _QORE_INTERN_QORE_ENCODING_PRIVATE_H
35 hashdecl qore_encoding_private {
39 unsigned char minwidth;
40 unsigned char maxwidth;
50 DLLLOCAL qore_encoding_private(
const char* code,
const char* desc =
nullptr,
unsigned char minwidth = 1,
53 bool ascii_compat =
true)
54 : code(code), desc(desc ? desc :
""), minwidth(minwidth), maxwidth(maxwidth), flength(flength), fend(fend),
55 fpos(fpos), fcharlen(fcharlen), get_unicode(get_unicode), ascii_compat(ascii_compat) {
58 DLLLOCAL
unsigned getMinCharWidth()
const {
62 DLLLOCAL
bool isAsciiCompat()
const {
66 DLLLOCAL
unsigned getUnicode(
const char* p)
const {
68 return get_unicode(p);
71 DLLLOCAL
static qore_encoding_private* get(
QoreEncoding& enc) {
75 DLLLOCAL
static const qore_encoding_private* get(
const QoreEncoding& enc) {
size_t(* mbcs_pos_t)(const char *str, const char *ptr, bool &invalid)
for multi-byte character set encodings: gives the character position of the ptr
Definition: QoreEncoding.h:56
qore_offset_t(* mbcs_charlen_t)(const char *str, size_t valid_len)
for multi-byte encodings: gives the number of total bytes for the character given one or more charact...
Definition: QoreEncoding.h:63
size_t(* mbcs_end_t)(const char *str, const char *end, size_t num_chars, bool &invalid)
for multi-byte character set encodings: gives the number of bytes for the number of chars
Definition: QoreEncoding.h:53
size_t(* mbcs_length_t)(const char *str, const char *end, bool &invalid)
for multi-byte character set encodings: gives the length of the string in characters
Definition: QoreEncoding.h:50
unsigned(* mbcs_get_unicode_t)(const char *p)
returns the unicode code point for the given character, assumes there is enough data for the characte...
Definition: QoreEncoding.h:66
defines string encoding functions in Qore
Definition: QoreEncoding.h:83