diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-20 07:15:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-20 07:15:19 +0000 |
commit | 52b3e3b97f42498c1f30984cb1e174422c235c80 (patch) | |
tree | 4870284e9b3533ede6249c364151f15dc7b704e5 /string.c | |
parent | d4e0abcec9aae83243c93efb5bcc6ec760151745 (diff) | |
download | ruby-52b3e3b97f42498c1f30984cb1e174422c235c80.tar.gz |
* string.c (rb_locale_str_new): new function to convert string
from locale to internal encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -526,6 +526,12 @@ rb_external_str_new(const char *ptr, long len) return rb_external_str_new_with_enc(ptr, len, rb_default_external_encoding()); } +VALUE +rb_locale_str_new(const char *ptr, long len) +{ + return rb_external_str_new_with_enc(ptr, len, rb_locale_encoding()); +} + static VALUE str_replace_shared(VALUE str2, VALUE str) { |