るりまサーチ

最速Rubyリファレンスマニュアル検索!
879件ヒット [201-300件を表示] (0.124秒)

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Integer#downto(min) {|n| ... } -> self (27114.0)

self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。

...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。

@param min 数値
@return self を返します。

//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}

@see Integer#upto, Numeric#step, Integer#times...

Integer#nobits?(mask) -> bool (27114.0)

self & mask のすべてのビットが 0 なら true を返します。

... true を返します。

self & mask == 0 と等価です。

@param mask ビットマスクを整数で指定します。

//emlist[][ruby]{
42.nobits?(42) # => false
0b1010_1010.nobits?(0b1000_0010) # => false
0b1010_1010.nobits?(0b1000_0001) # => false
0b0100_0101.nobits?(0b...
...1010_1010) # => true
//}

@see Integer#allbits?
@see Integer#anybits?...

Integer#times -> Enumerator (27114.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@see Integer#upto, Integer#downto, Numeric#step...

Integer#times {|n| ... } -> self (27114.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@see Integer#upto, Integer#downto, Numeric#step...

Integer#inspect(base=10) -> String (27102.0)

整数を 10 進文字列表現に変換します。

...列表
現に変換します。

//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}

@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数値を...

絞り込み条件を変える

Integer#to_d -> BigDecimal (27102.0)

自身を BigDecimal に変換します。BigDecimal(self) と同じです。

...自身を BigDecimal に変換します。BigDecimal(self) と同じです。

@return BigDecimal に変換したオブジェクト...

Integer#to_f -> Float (27102.0)

self を浮動小数点数(Float)に変換します。

...self を浮動小数点数(Float)に変換します。

self が Float の範囲に収まらない場合、Float::INFINITY を返します。

//emlist[][ruby]{
1.to_f # => 1.0
(Float::MAX.to_i * 2).to_f # => Infinity
(-Float::MAX.to_i * 2).to_f # => -Infinity
//}...

Integer#to_i -> self (27102.0)

self を返します。

...self を返します。

//emlist[][ruby]{
10.to_i # => 10
//}...

Integer#to_int -> self (27102.0)

self を返します。

...self を返します。

//emlist[][ruby]{
10.to_i # => 10
//}...
<< < 1 2 3 4 5 ... > >>