るりまサーチ

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer chr
  5. integer upto

ライブラリ

クラス

キーワード

検索結果

String#scanf(format) -> Array (26234.0)

ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。

...列が見つからない場合は空の配列を
生成して返します。

require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]

ブロックを指定した場合は scanf を継続して実行し、順次
見つかった文字列を変換したオブジェ...
...re 'scanf'
str = "123 0x45 678 0x90"
p str.scanf("%d%x"){|n, s| [n, s]}
#=> [[123, 69], [678, 144]]

formatに完全にマッチしていなくても、部分的にマッチしていれば、
ブロックは実行されます。

require 'scanf'
str = "123 abc 456 def"
ret = str.scanf("%...
...の空白にマッチします。
//emlist{
require 'scanf'
p "a 10".scanf("%s %d") # => ["a", 10]
p "a10".scanf("%1s %d") # => ["a", 10]
//}
: %%
% そのもの

: %d
: %u
符号付き10進数

: %i
Kernel.#Integerのように接頭辞を受け付ける符号付き整...

String#scanf(format) {|*ary| ...} -> Array (26234.0)

ブロックを指定しない場合、見つかった文字列を format に従って変 換し、そのオブジェクトの配列を返します。 format で指定した文字列が見つからない場合は空の配列を 生成して返します。

...列が見つからない場合は空の配列を
生成して返します。

require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf("%d%s") #=> [123, "abc"]

ブロックを指定した場合は scanf を継続して実行し、順次
見つかった文字列を変換したオブジェ...
...re 'scanf'
str = "123 0x45 678 0x90"
p str.scanf("%d%x"){|n, s| [n, s]}
#=> [[123, 69], [678, 144]]

formatに完全にマッチしていなくても、部分的にマッチしていれば、
ブロックは実行されます。

require 'scanf'
str = "123 abc 456 def"
ret = str.scanf("%...
...の空白にマッチします。
//emlist{
require 'scanf'
p "a 10".scanf("%s %d") # => ["a", 10]
p "a10".scanf("%1s %d") # => ["a", 10]
//}
: %%
% そのもの

: %d
: %u
符号付き10進数

: %i
Kernel.#Integerのように接頭辞を受け付ける符号付き整...

NEWS for Ruby 2.5.0 (72.0)

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

...う。 13405

* Integer
* Integer#round, Integer#floor, Integer#ceil, Integer#truncate は常に Integer を返すようになりました
13420
* Integer#pow を追加 12508 11003
* Integer#allbits?, Integer#anybits?, Integer#nobits? を追加 12753
* Integer.sqrt を追加...
...* cmath
* csv
* date
* dbm
* etc
* fcntl
* fiddle
* fileutils
* gdbm
* ipaddr
* scanf
* sdbm
* stringio
* strscan
* webrick
* zlib

* Logger
* Logger.new("| command") は意図せず、コマンド...

NEWS for Ruby 2.7.0 (30.0)

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

...エンコーディングを設定する
IO#set_encoding_by_bomメソッドが追加されました。 15210

* Integer
* 変更されたメソッド
* Integer#[] がRangeを受け付けるようになりました。 8842

//emlist[][ruby]{
0b01001101[2, 4] #=> 0b0011
0b01001100[...
...れません。これらの機能を使う場合は対応する gem をインストールしてください。
* CMath (cmath gem)
* Scanf (scanf gem)
* Shell (shell gem)
* Synchronizer (sync gem)
* ThreadsWait (thwait gem)
* E2MM (e2mmap gem)

* Proc
* Proc...
...yの上流リポジトリはSubversionからGitに変わりました。
* https://git.ruby-lang.org/ruby.git
* RUBY_REVISIONのクラスはIntegerからStringに変わりました。
* RUBY_DESCRIPTIONはSubversionのリビジョンの代わりにGitのリビジョンが
入るよ...