328件ヒット
[301-328件を表示]
(0.069秒)
別のキーワード
検索結果
-
StringIO
# each _ byte -> Enumerator (3016.0) -
自身から 1 バイトずつ読み込み、整数 ch に変換し、それを引数として与えられたブロックを実行します。
...変換し、それを引数として与えられたブロックを実行します。
@raise IOError 自身が読み取り不可なら発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge")
a.each_byte{|ch| p ch }
#=> 104
# 111
# 103
# 101
//}
@see IO#each_byte... -
StringIO
# each _ byte {|ch| . . . } -> self (3016.0) -
自身から 1 バイトずつ読み込み、整数 ch に変換し、それを引数として与えられたブロックを実行します。
...変換し、それを引数として与えられたブロックを実行します。
@raise IOError 自身が読み取り不可なら発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge")
a.each_byte{|ch| p ch }
#=> 104
# 111
# 103
# 101
//}
@see IO#each_byte... -
StringIO
# pos=(n) (3016.0) -
自身の位置を n に移動します。自身が表す文字列のサイズより大きくても構いません。
...。
@param n 自身の位置を整数で指定します。
@raise Errno::EINVAL n がマイナスである場合に発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge", 'r+')
a.pos = 10
a << 'Z'
a.string #=> "hoge\000\000\000\000\000\000Z"
//}...