るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
18件ヒット [1-18件を表示] (0.055秒)
トップページ > クエリ:convert[x] > バージョン:2.6.0[x] > クエリ:Integer[x]

別のキーワード

  1. csv convert
  2. csv header_convert
  3. _builtin try_convert
  4. converter primitive_convert
  5. _builtin primitive_convert

検索結果

Kernel.#Integer(arg, base = 0, exception: true) -> Integer | nil (55111.0)

引数を整数(Fixnum,Bignum)に変換した結果を返します。

引数を整数(Fixnum,Bignum)に変換した結果を返します。

引数が数値の場合は直接変換し(小数点以下切り落とし)、
文字列の場合は、進数を表す接頭辞を含む整数表現とみなせる文字列のみ
変換します。

数値と文字列以外のオブジェクトに対しては arg.to_int, arg.to_i を
この順に使用して変換します。

@param arg 変換対象のオブジェクトです。

@param base 基数として0か2から36の整数を指定します(引数argに文字列を指
定した場合のみ)。省略するか0を指定した場合はプリフィクスか
ら基数を判断...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer) -> Symbol (27367.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> Symbol (27367.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> Symbol (27367.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, options) -> Symbol (27367.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@...

絞り込み条件を変える

Kernel#convertible_int(type, headers = nil, opts = nil) (18493.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (18493.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

CSV::Converters -> Hash (18373.0)

このハッシュは名前でアクセスできる組み込みの変換器を保持しています。

このハッシュは名前でアクセスできる組み込みの変換器を保持しています。

CSV#convert で使用する変換器として使用できます。
また CSV.new のオプションとして使用することもできます。

: :integer
Kernel.#Integer を使用してフィールドを変換します。
: :float
Kernel.#Float を使用してフィールドを変換します。
: :numeric
:integer と :float の組み合わせです。
: :date
Date.parse を使用してフィールドを変換します。
: :date_time
DateTime.pars...

CSV#converters -> Array (18355.0)

現在の変換器のリストを返します。

現在の変換器のリストを返します。

//emlist[例][ruby]{
require "csv"

csv = CSV.new("header1,header2\nrow1_1,row1_2", converters: CSV::Converters.keys)
csv.converters # => [:integer, :float, :integer, :float, :date, :date_time, :date_time, :integer, :float]
//}

@see CSV::Converters

CSV::FieldInfo#index -> Integer (322.0)

行内で何番目のフィールドかわかるゼロベースのインデックスを返します。

行内で何番目のフィールドかわかるゼロベースのインデックスを返します。

//emlist[例][ruby]{
require 'csv'

csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.index
Date.parse(field)
end
p csv.first

# => 0
# => 1
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s...

絞り込み条件を変える

CSV::FieldInfo#line -> Integer (322.0)

行番号を返します。

行番号を返します。

//emlist[例][ruby]{
require 'csv'

csv = CSV.new("date1,date2,date3\n2018-07-09,2018-07-10\n2018-08-09,2018-08-10", headers: true)
csv.convert do |field,field_info|
p field_info.line
Date.parse(field)
end
p csv.to_a

# => 2
# => 2
# => 3
# => 3
# => [#<CSV::Row "date1":#<Date: 2018-07...

Regexp#=~(string) -> Integer | nil (322.0)

文字列 string との正規表現マッチを行います。マッチした場合、 マッチした位置のインデックスを返します(先頭は0)。マッチしなかった 場合、あるいは string が nil の場合には nil を返 します。

文字列 string との正規表現マッチを行います。マッチした場合、
マッチした位置のインデックスを返します(先頭は0)。マッチしなかった
場合、あるいは string が nil の場合には nil を返
します。

//emlist[例][ruby]{
p /foo/ =~ "foo" # => 0
p /foo/ =~ "afoo" # => 1
p /foo/ =~ "bar" # => nil
//}

組み込み変数 $~ もしくは Regexp.last_match にマッチに関する情報 MatchData が設定されます。

文字列のかわりにSymbolをマッチさせることが...

NEWS for Ruby 2.5.0 (217.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

NEWS for Ruby 2.5.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.4.0 以降の変更

=== 言語仕様の変更

* トップレベルの定数参照を削除しました 11547
* do/end ブロック内部で rescue/else/ensure を書けるようになりました 12906
* 文字列の式展...

ruby 1.9 feature (127.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

ruby 1.9 feature
ruby version 1.9.0 は開発版です。
以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。
1.9.1 以降は安定版です。
バグ修正がメインになります。

記号について(特に重要なものは大文字(主観))

* カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
* [parser]: 文法の変更
* [regexp]: 正規表現の機能拡張
* [marshal]: Marshal ファイルのフォーマット変更
* ...

1.6.8から1.8.0への変更点(まとめ) (109.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

1.6.8から1.8.0への変更点(まとめ)
* ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>))
* ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>))
* ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>))...

絞り込み条件を変える

ruby 1.6 feature (91.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) -> stable-snapshot

: 2003-01-22: errno

EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていま...

Kernel.#putc(ch) -> object (37.0)

文字 ch を 標準出力 $stdout に出力します。

文字 ch を 標準出力 $stdout に出力します。

ch が数値なら 0 〜 255 の範囲の対応する文字を出力します。
ch が文字列なら、その先頭1文字を出力します。
どちらでもない場合は、ch.to_int で整数に変換を試みます。

@param ch 出力する文字です。数または文字列で指定します。
@return ch を返します
@raise RangeError Bignum を引数にした場合に発生します。
@raise IOError 標準出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
@...

ruby 1.8.2 feature (37.0)

ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。

ruby 1.8.2 feature
ruby 1.8.2 での ruby 1.8.1 からの変更点です。

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。

以下は各変更点に付けるべきタグです。

*カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/...