1#ifndef RUBY_INTERNAL_ENCODING_CTYPE_H
2#define RUBY_INTERNAL_ENCODING_CTYPE_H
24#include "ruby/onigmo.h"
45 OnigUChar *up = RBIMPL_CAST((OnigUChar *)p);
46 OnigUChar *ue = RBIMPL_CAST((OnigUChar *)e);
48 return ONIGENC_IS_MBC_NEWLINE(enc, up, ue);
65 return ONIGENC_IS_CODE_CTYPE(enc, c, t);
84 return ONIGENC_IS_CODE_ASCII(c);
98 return ONIGENC_IS_CODE_ALPHA(enc, c);
112 return ONIGENC_IS_CODE_LOWER(enc, c);
126 return ONIGENC_IS_CODE_UPPER(enc, c);
140 return ONIGENC_IS_CODE_PUNCT(enc, c);
154 return ONIGENC_IS_CODE_ALNUM(enc, c);
168 return ONIGENC_IS_CODE_PRINT(enc, c);
182 return ONIGENC_IS_CODE_SPACE(enc, c);
196 return ONIGENC_IS_CODE_DIGIT(enc, c);
230#define rb_enc_is_newline rb_enc_is_newline
231#define rb_enc_isalnum rb_enc_isalnum
232#define rb_enc_isalpha rb_enc_isalpha
233#define rb_enc_isascii rb_enc_isascii
234#define rb_enc_isctype rb_enc_isctype
235#define rb_enc_isdigit rb_enc_isdigit
236#define rb_enc_islower rb_enc_islower
237#define rb_enc_isprint rb_enc_isprint
238#define rb_enc_ispunct rb_enc_ispunct
239#define rb_enc_isspace rb_enc_isspace
240#define rb_enc_isupper rb_enc_isupper
Defines RBIMPL_ATTR_CONST.
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
static bool rb_enc_ispunct(OnigCodePoint c, rb_encoding *enc)
Identical to rb_ispunct(), except it additionally takes an encoding.
static bool rb_enc_isalpha(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isalpha(), except it additionally takes an encoding.
static bool rb_enc_isupper(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isupper(), except it additionally takes an encoding.
static bool rb_enc_isascii(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isascii(), except it additionally takes an encoding.
static bool rb_enc_is_newline(const char *p, const char *e, rb_encoding *enc)
Queries if the passed pointer points to a newline character.
int rb_enc_tolower(int c, rb_encoding *enc)
Identical to rb_tolower(), except it additionally takes an encoding.
static bool rb_enc_isprint(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isprint(), except it additionally takes an encoding.
static bool rb_enc_isctype(OnigCodePoint c, OnigCtype t, rb_encoding *enc)
Queries if the passed code point is of passed character type in the passed encoding.
static bool rb_enc_islower(OnigCodePoint c, rb_encoding *enc)
Identical to rb_islower(), except it additionally takes an encoding.
int rb_enc_toupper(int c, rb_encoding *enc)
Identical to rb_toupper(), except it additionally takes an encoding.
static bool rb_enc_isspace(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isspace(), except it additionally takes an encoding.
static bool rb_enc_isalnum(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isalnum(), except it additionally takes an encoding.
static bool rb_enc_isdigit(OnigCodePoint c, rb_encoding *enc)
Identical to rb_isdigit(), except it additionally takes an encoding.
RBIMPL_ATTR_CONST() int rb_io_oflags_fmode(int oflags)
Converts an oflags (that rb_io_modestr_oflags() returns) to a fmode (that rb_io_mode_flags() returns)...