summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-16 02:55:08 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-16 02:55:08 +0000
commitaf75cc01bc7ed39eafbc958936c51e0221313051 (patch)
treef4f3ff3eaafa2516af2c2947bd37f333d84e79e1 /encoding.c
parent125c0a0d93f8562c1115290d10e110e20053eebb (diff)
* encoding.c (rb_enc_strlen): moved to string.c.
* string.c (rb_enc_strlen): use search_nonascii. (str_strlen): don't use search_nonascii. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/encoding.c b/encoding.c
index 5a8369b6f3..da89d8ac70 100644
--- a/encoding.c
+++ b/encoding.c
@@ -720,23 +720,6 @@ rb_obj_encoding(VALUE obj)
return rb_enc_from_encoding(enc);
}
-long
-rb_enc_strlen(const char *p, const char *e, rb_encoding *enc)
-{
- long c;
-
- if (rb_enc_mbmaxlen(enc) == rb_enc_mbminlen(enc)) {
- return (e - p) / rb_enc_mbminlen(enc);
- }
-
- for (c=0; p<e; c++) {
- int n = rb_enc_mbclen(p, e, enc);
-
- p += n;
- }
- return c;
-}
-
int
rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc)
{