mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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
This commit is contained in:
parent
abac848564
commit
eb0e3fe78f
3 changed files with 39 additions and 0 deletions
19
README.EXT
19
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue