Module: GLib::UniChar
- Defined in:
- ext/glib2/rbglib_unicode.c
Class Method Summary collapse
- .alnum? ⇒ Boolean
- .alpha? ⇒ Boolean
- .break_type(unichar) ⇒ Object
- .cntrl? ⇒ Boolean
- .combining_class(unichar) ⇒ Object
- .defined? ⇒ Boolean
- .digit? ⇒ Boolean
- .digit_value(unichar) ⇒ Object
- .get_mirror_char(unichar) ⇒ Object
- .get_script(unichar) ⇒ Object
- .graph? ⇒ Boolean
- .lower? ⇒ Boolean
- .mark?(unichar) ⇒ Boolean
- .print? ⇒ Boolean
- .punct? ⇒ Boolean
- .space? ⇒ Boolean
- .title? ⇒ Boolean
- .to_lower(unichar) ⇒ Object
- .to_title(unichar) ⇒ Object
- .to_upper ⇒ Object
- .to_utf8(unichar) ⇒ Object
- .type(unichar) ⇒ Object
- .upper? ⇒ Boolean
- .wide? ⇒ Boolean
- .wide_cjk? ⇒ Boolean
- .xdigit? ⇒ Boolean
- .xdigit_value(unichar) ⇒ Object
- .zero_width?(unichar) ⇒ Boolean
Class Method Details
.alnum? ⇒ Boolean
.alpha? ⇒ Boolean
.break_type(unichar) ⇒ Object
87 88 89 90 91 92 |
# File 'ext/glib2/rbglib_unicode.c', line 87
static VALUE
rbglib_m_unichar_break_type(VALUE self, VALUE unichar)
{
return GENUM2RVAL(g_unichar_break_type(NUM2UINT(unichar)),
G_TYPE_UNICODE_BREAK_TYPE);
}
|
.cntrl? ⇒ Boolean
.combining_class(unichar) ⇒ Object
139 140 141 142 143 |
# File 'ext/glib2/rbglib_unicode.c', line 139
static VALUE
rbglib_m_unichar_combining_class(VALUE self, VALUE unichar)
{
return INT2NUM(g_unichar_combining_class(NUM2UINT(unichar)));
}
|
.defined? ⇒ Boolean
.digit? ⇒ Boolean
.digit_value(unichar) ⇒ Object
68 69 70 71 72 |
# File 'ext/glib2/rbglib_unicode.c', line 68
static VALUE
rbglib_m_unichar_digit_value(VALUE self, VALUE unichar)
{
return INT2NUM(g_unichar_digit_value(NUM2UINT(unichar)));
}
|
.get_mirror_char(unichar) ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 |
# File 'ext/glib2/rbglib_unicode.c', line 125
static VALUE
rbglib_m_unichar_get_mirror_char(VALUE self, VALUE unichar)
{
gunichar mirrored_char;
if (g_unichar_get_mirror_char(NUM2UINT(unichar), &mirrored_char)) {
return UINT2NUM(mirrored_char);
} else {
return unichar;
}
}
|
.get_script(unichar) ⇒ Object
145 146 147 148 149 150 |
# File 'ext/glib2/rbglib_unicode.c', line 145
static VALUE
rbglib_m_unichar_get_script(VALUE self, VALUE unichar)
{
return GENUM2RVAL(g_unichar_get_script(NUM2UINT(unichar)),
G_TYPE_UNICODE_SCRIPT);
}
|
.graph? ⇒ Boolean
.lower? ⇒ Boolean
.mark?(unichar) ⇒ Boolean
152 153 154 155 156 |
# File 'ext/glib2/rbglib_unicode.c', line 152
static VALUE
rbglib_m_unichar_ismark(VALUE self, VALUE unichar)
{
return CBOOL2RVAL(g_unichar_ismark(NUM2UINT(unichar)));
}
|
.print? ⇒ Boolean
.punct? ⇒ Boolean
.space? ⇒ Boolean
.title? ⇒ Boolean
.to_lower(unichar) ⇒ Object
56 57 58 59 60 |
# File 'ext/glib2/rbglib_unicode.c', line 56
static VALUE
rbglib_m_unichar_tolower(VALUE self, VALUE unichar)
{
return UINT2NUM(g_unichar_tolower(NUM2UINT(unichar)));
}
|
.to_title(unichar) ⇒ Object
62 63 64 65 66 |
# File 'ext/glib2/rbglib_unicode.c', line 62
static VALUE
rbglib_m_unichar_totitle(VALUE self, VALUE unichar)
{
return UINT2NUM(g_unichar_totitle(NUM2UINT(unichar)));
}
|
.to_upper ⇒ Object
.to_utf8(unichar) ⇒ Object
445 446 447 448 449 450 451 452 453 |
# File 'ext/glib2/rbglib_unicode.c', line 445
static VALUE
rbglib_m_unichar_to_utf8(VALUE self, VALUE unichar)
{
gchar utf8[6];
gint len;
len = g_unichar_to_utf8(NUM2UINT(unichar), utf8);
return rb_str_new(utf8, len);
}
|
.type(unichar) ⇒ Object
80 81 82 83 84 85 |
# File 'ext/glib2/rbglib_unicode.c', line 80
static VALUE
rbglib_m_unichar_type(VALUE self, VALUE unichar)
{
return GENUM2RVAL(g_unichar_type(NUM2UINT(unichar)),
G_TYPE_UNICODE_TYPE);
}
|
.upper? ⇒ Boolean
.wide? ⇒ Boolean
.wide_cjk? ⇒ Boolean
.xdigit? ⇒ Boolean
.xdigit_value(unichar) ⇒ Object
74 75 76 77 78 |
# File 'ext/glib2/rbglib_unicode.c', line 74
static VALUE
rbglib_m_unichar_xdigit_value(VALUE self, VALUE unichar)
{
return INT2NUM(g_unichar_xdigit_value(NUM2UINT(unichar)));
}
|
.zero_width?(unichar) ⇒ Boolean
158 159 160 161 162 |
# File 'ext/glib2/rbglib_unicode.c', line 158
static VALUE
rbglib_m_unichar_iszerowidth(VALUE self, VALUE unichar)
{
return CBOOL2RVAL(g_unichar_iszerowidth(NUM2UINT(unichar)));
}
|