るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Time#-(sec) -> Time (21249.0)

自身より sec 秒だけ前の時刻を返します。

...り sec 秒だけ前の時刻を返します。

@param sec 実数を秒を単位として指定します。

//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t2 - 2592000 # => 2000-01-01 00:00:00 +0900
//}...

Time#-(time) -> Float (21239.0)

自身と time との時刻の差を Float で返します。単位は秒です。

...time との時刻の差を Float で返します。単位は秒です。

@param time 自身との差を算出したい Time オブジェクトを指定します。

//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t2 -...

Rational#-(other) -> Rational | Float (21214.0)

差を計算します。

...差を計算します。

@param other 自身から引く数

other に Float を指定した場合は、計算結果を Float で返しま
す。

//emlist[例][ruby]{
r = Rational(3, 4)
r - 1 # => (-1/4)
r - 0.5 # => 0.25
//}...

Integer#-(other) -> Numeric (21208.0)

算術演算子。差を計算します。

...算術演算子。差を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

//emlist[][ruby]{
4 - 1 #=> 3
//}...

Bignum#-(other) -> Fixnum | Bignum | Float (21202.0)

算術演算子。差を計算します。

算術演算子。差を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

絞り込み条件を変える

Fixnum#-(other) -> Fixnum | Bignum | Float (21202.0)

算術演算子。差を計算します。

算術演算子。差を計算します。

@param other 二項演算の右側の引数(対象)
@return 計算結果

Encoding::InvalidByteSequenceError#destination_encoding -> Encoding (18402.0)

エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。

...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。

@see Encoding::InvalidByteSequenceError#source_encoding,
Encoding::UndefinedConversionError#destination_encoding...

Encoding::InvalidByteSequenceError#destination_encoding_name -> String (18402.0)

エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

@see Encoding::InvalidByteSequenceError#destination_encoding...

Encoding::UndefinedConversionError#destination_encoding -> Encoding (18402.0)

エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。

...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。

@see Encoding::UndefinedConversionError#source_encoding...

Encoding::UndefinedConversionError#destination_encoding_name -> String (18402.0)

エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。

@see Encoding::UndefinedConversionError#destination_encoding...

絞り込み条件を変える

Encoding::InvalidByteSequenceError#incomplete_input? -> bool (18332.0)

エラー発生時に入力文字列が不足している場合に真を返します。

...す。

//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")

begin
ec.convert("abc\xA1z")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "z" on EUC-JP>
p $!.incomplete_input? #=> false
end

begin
ec.conve...
...rt("abc\xA1")
ec.finish
rescue Encoding::InvalidByteSequenceError
p $! #=> #<Encoding::InvalidByteSequenceError: incomplete "\xA1" on EUC-JP>
p $!.incomplete_input? #=> true
end
//}...
<< 1 2 3 ... > >>