mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Docs for String#dump
This commit is contained in:
parent
3bbdcf0848
commit
21c78cb0f7
2 changed files with 54 additions and 9 deletions
11
string.c
11
string.c
|
@ -7413,16 +7413,9 @@ rb_str_inspect(VALUE str)
|
|||
|
||||
/*
|
||||
* call-seq:
|
||||
* dump -> string
|
||||
* dump -> new_string
|
||||
*
|
||||
* Returns a printable version of +self+, enclosed in double-quotes,
|
||||
* with special characters escaped, and with non-printing characters
|
||||
* replaced by hexadecimal notation:
|
||||
*
|
||||
* "hello \n ''".dump # => "\"hello \\n ''\""
|
||||
* "\f\x00\xff\\\"".dump # => "\"\\f\\x00\\xFF\\\\\\\"\""
|
||||
*
|
||||
* Related: String#undump (inverse of String#dump).
|
||||
* :include: doc/string/dump.rdoc
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue