るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.033秒)
トップページ > ライブラリ:ビルトイン[x] > クエリ:new[x] > バージョン:2.1.0[x] > クエリ:replacement=[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

クラス

検索結果

Encoding::Converter#replacement=(string) (54343.0)

置換文字を設定します。

置換文字を設定します。

@param string 変換器に設定する置換文字

//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace)
ec.replacement = "<undef>"
p ec.convert("a \u3042 b") #=> "a <undef> b"
//}