るりまサーチ

最速Rubyリファレンスマニュアル検索!
458件ヒット [1-100件を表示] (0.091秒)
トップページ > クエリ:d[x] > クエリ:replace[x]

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. rsa d
  4. kernel $-d
  5. rsa d=

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

YAML::DBM#replace(other) -> YAML::DBM (21201.0)

self の内容を other の内容で置き換えます。

...self の内容を other の内容で置き換えます。

@param other Hash、DBM オブジェクトを指定します。

@raise DBMError 更新に失敗した場合に発生します。

自身を返します。...

SDBM#replace(other) -> self (21143.0)

self の内容を other の内容で置き換えます。

...

require 'sdbm'

d
b1 = SDBM.open('aaa.gdbm', 0666)
d
b1['a'] = 'aaa'
d
b1['b'] = 'bbb'
d
b1['c'] = 'ccc'
d
b2 = SDBM.open('bbb.gdbm', 0666)
d
b2['c'] = 'ccc'
d
b2['d'] = 'ddd'
hash = { 'x' => 'xxx', 'y' => 'yyy'}

p db1 #=> #<SDBM:0xb7c304d0>
p db1.to_hash...
...#=> {"a"=>"aaa", "b"=>"bbb", "c"=>"ccc"}
p db1.replace(db2) #=> #<SDBM:0xb7c304d0>
p db1.to_hash #=> {"c"=>"ccc", "d"=>"ddd"}
p db1.replace(hash) #=> #<SDBM:0xb7c304d0>
p db1.to_hash #=> {"x"=>"xxx", "y"=>"yyy"}...

GDBM#replace(other) -> self (21137.0)

self の内容を other の内容で置き換えます。

...gdbm'

d
b1 = GDBM.open('aaa.gdbm', 0666, GDBM::NEWDB)
d
b1['a'] = 'aaa'
d
b1['b'] = 'bbb'
d
b2 = GDBM.open('bbb.gdbm', 0666, GDBM::NEWDB)
d
b2['c'] = 'ccc'
d
b2['d'] = 'ddd'
hash = { 'x' => 'xxx', 'y' => 'yyy'}

p db1 #=> #<GDBM:0xb7d1c8a8>
p db1.replace(db2) #=> #<GD...
...BM:0xb7d1c8a8>
p db1.replace(hash) #=> #<GDBM:0xb7d1c8a8>...

DBM#replace(other) -> self (21113.0)

self の内容を other の内容で置き換えます。

...

require 'dbm'

d
b1 = DBM.open('aaa.db', 0666, DBM::NEWDB)
d
b1[:a] = 'aaa'
d
b1[:b] = 'bbbbbb'
d
b2 = DBM.open('bbb.db', 0666, DBM::NEWDB)
d
b2[:bb] = 'bbb'
d
b2[:cc] = 'ccc'

p db1.keys #=> ['b', 'a']

d
b1.replace(db2)

p db1.keys #=> ['bb', 'cc']
p db2.keys #=> ['bb',...
...'cc']

hash = {'x' => 'xxx', 'y' => 'yyy' }
p db1 #=> #<DBM:0xb7c7eb08>
p db1.replace(hash) #=> #<DBM:0xb7c7eb08>...

REXML::Parent#replace_child(to_replace, replacement) -> () (12430.0)

子ノード列上の to_replace を replacement に置き換えます。

...子ノード列上の to_replace replacement に置き換えます。

to_replace の parent は nil に、
replace
ment の parent は selfに変更されます。

@param to_replace 置き換え元のノード
@param replacement 置き換え先のノード...

絞り込み条件を変える

REXML::Child#replace_with(child) -> self (9207.0)

親ノードの子ノード列上において、 self を child に置き換えます。

...親ノードの子ノード列上において、 self を child に置き換えます。

@param child 置き換え後のノード
@see REXML::Parent#replace_child...

Encoding::Converter#replacement=(string) (9106.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"
//}...

Encoding::Converter#replacement -> String (9100.0)

変換器に設定されている置換文字を返します。

...器に設定されている置換文字を返します。

@return 変換器に設定されている置換文字

//emlist[][ruby]{
ec = Encoding::Converter.new("euc-jp", "us-ascii")
p ec.replacement #=> "?"

ec = Encoding::Converter.new("euc-jp", "utf-8")
p ec.replacement #=> "\uFFFD"
//}...

String#encode(**options) -> String (6162.0)

self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。

...引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。

@param encoding 変換先のエン...
...コーディングを表す文字列か Encoding オブジェクトを指定します。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param option 変換オプションをキーワード引数で与えます...
...れた文字列

変換オプション

: :invalid => nil
変換元のエンコーディングにおいて不正なバイトがあった場合に、例外 Encoding::InvalidByteSequenceError を投げます。(デフォルト)
: :invalid => :replace
変換元のエンコーディングにおい...
<< 1 2 3 ... > >>