108件ヒット
[1-100件を表示]
(0.059秒)
別のキーワード
クラス
-
Scanf
:: FormatSpecifier (66) -
Scanf
:: FormatString (30) - String (12)
キーワード
- conversion (6)
-
count
_ space? (6) -
last
_ spec (6) -
last
_ spec _ tried (6) - letter (6)
- match (6)
- matched (6)
-
matched
_ string (6) -
mid
_ match? (6) - prune (6)
-
re
_ string (6) - scanf (12)
- space (6)
-
spec
_ count (6) -
to
_ re (6) -
to
_ s (6) - width (6)
検索結果
先頭5件
-
Scanf
:: FormatSpecifier # count _ space? (6103.0) -
@todo
@todo -
Scanf
:: FormatString # last _ spec (6103.0) -
@todo
@todo -
Scanf
:: FormatString # last _ spec _ tried (6103.0) -
@todo
@todo -
Scanf
:: FormatString # prune(n=matched _ count) (6103.0) -
@todo
@todo -
Scanf
:: FormatString # space (6103.0) -
@todo
@todo -
Scanf
:: FormatString # spec _ count (6103.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # conversion (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # letter (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # match(str) (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # matched (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # matched _ string (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # mid _ match? (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # re _ string (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # to _ re (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # to _ s (3003.0) -
@todo
@todo -
Scanf
:: FormatSpecifier # width (3003.0) -
@todo
@todo -
String
# scanf(format) -> Array (63.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("%......}
p ret #=> [["123", nil], ["abc", 456], ["def", nil]]
@param format スキャンするフォーマットを文字列で指定します。
詳細は、m:String#scanf#format を参照してください。
使用例:
require 'scanf'
str = "123 abc 456 def 789 ghi"
p str.scanf(...