55件ヒット
[1-55件を表示]
(0.048秒)
ライブラリ
- ビルトイン (55)
クラス
-
Encoding
:: Converter (33) - MatchData (22)
検索結果
先頭5件
- MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] - MatchData
# offset(n) -> [Integer , Integer] | [nil , nil] - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol
-
MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] (26165.0) -
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。
...う名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返
します。
//emlist[例][ruby]{
[ self.begin(name), self.end(name) ]
//}
と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返し......p $~.offset('year') # => [0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, Mat......chData#end, MatchData#offset... -
MatchData
# offset(n) -> [Integer , Integer] | [nil , nil] (26130.0) -
n 番目の部分文字列のオフセットの配列 [start, end] を返 します。
...]{
[ self.begin(n), self.end(n) ]
//}
と同じです。n番目の部分文字列がマッチしていなければ
[nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した場合に発生します。
@see MatchData#begin, MatchDa......ta#end, MatchData#offset... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (8106.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ram source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定す......source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (8106.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ram source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定す......source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (8106.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...ram source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定す......source_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec...