aboutsummaryrefslogtreecommitdiffstats
path: root/encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/encoding.c b/encoding.c
index 223eace375..4ef45cd65e 100644
--- a/encoding.c
+++ b/encoding.c
@@ -727,6 +727,12 @@ rb_obj_encoding(VALUE obj)
}
int
+rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc)
+{
+ return ONIGENC_MBC_ENC_LEN(enc, (UChar*)p, (UChar*)e);
+}
+
+int
rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc)
{
int n = ONIGENC_PRECISE_MBC_ENC_LEN(enc, (UChar*)p, (UChar*)e);