廃止 Gecko 37 (Firefox 37 / Thunderbird 37 / SeaMonkey 2.34)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
非標準
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
概要
特殊文字をエスケープシーケンスで置換しダブル・クォーテーション("
)でラップした文字列のコピーを返します。
構文
str.quote()
例
str |
str.quote() |
eval( str.quote() ) |
---|---|---|
Hello world! |
"Hello world!" |
Hello world! |
Hello |
"Hello\n\tworld!" |
Hello |
" \ — ' |
"\" \\ \u2014 '" |
" \ — ' |