summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/string.c b/string.c
index 08f3cdbf5c..3dd86c9119 100644
--- a/string.c
+++ b/string.c
@@ -571,6 +571,12 @@ rb_str_export(VALUE str)
}
VALUE
+rb_str_export_locale(VALUE str)
+{
+ return rb_str_conv_enc(str, STR_ENC_GET(str), rb_locale_encoding());
+}
+
+VALUE
rb_str_export_to_enc(VALUE str, rb_encoding *enc)
{
return rb_str_conv_enc(str, STR_ENC_GET(str), enc);