aboutsummaryrefslogtreecommitdiffstats
path: root/README.EXT
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 05:53:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 05:53:05 +0000
commiteb0e3fe78fa5338299fde5e5263121df1a64493c (patch)
treea7245817207c59ea774339f873b67417b23073e2 /README.EXT
parentabac84856448e8a15e941cce8c1e48f891e83a3c (diff)
downloadruby-eb0e3fe78fa5338299fde5e5263121df1a64493c.tar.gz
intern.h: rb_str_new_literal
* include/ruby/intern.h (rb_str_new_literal): make ruby string from literal C-string. incorporated from mruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
-rw-r--r--README.EXT19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.EXT b/README.EXT
index f4e4a20d14..9f5c1a83fc 100644
--- a/README.EXT
+++ b/README.EXT
@@ -184,6 +184,10 @@ rb_str_new_cstr(const char *ptr) ::
Creates a new Ruby string from a C string. This is equivalent to
rb_str_new(ptr, strlen(ptr)).
+rb_str_new_literal(const char *ptr) ::
+
+ Creates a new Ruby string from a C string literal.
+
rb_tainted_str_new(const char *ptr, long len) ::
Creates a new tainted Ruby string. Strings from external data
@@ -226,16 +230,31 @@ rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc) ::
Creates a new Ruby string with the specified encoding.
+rb_enc_str_new_literal(const char *ptr) ::
+
+ Creates a new Ruby string from a C string literal with the specified
+ encoding.
+
rb_usascii_str_new(const char *ptr, long len) ::
rb_usascii_str_new_cstr(const char *ptr) ::
Creates a new Ruby string with encoding US-ASCII.
+rb_usascii_str_new_literal(const char *ptr) ::
+
+ Creates a new Ruby string from a C string literal with encoding
+ US-ASCII.
+
rb_utf8_str_new(const char *ptr, long len) ::
rb_utf8_str_new_cstr(const char *ptr) ::
Creates a new Ruby string with encoding UTF-8.
+rb_utf8_str_new_literal(const char *ptr) ::
+
+ Creates a new Ruby string from a C string literal with encoding
+ UTF-8.
+
rb_str_resize(VALUE str, long len) ::
Resizes Ruby string to len bytes. If str is not modifiable, this