クラス
- CSV (12)
- Encoding (12)
-
Encoding
:: Converter (72) -
Enumerator
:: Lazy (320) -
RDoc
:: Options (36) - Regexp (12)
- String (94)
モジュール
- Enumerable (12)
-
Gem
:: InstallUpdateOptions (12)
キーワード
- chunk (24)
- collect (12)
-
collect
_ concat (12) - convert (12)
- drop (12)
-
drop
_ while (12) - encode (36)
- filter (7)
-
filter
_ map (6) -
find
_ all (12) -
fixed
_ encoding? (12) -
flat
_ map (12) -
force
_ encoding (12) -
force
_ output (12) -
force
_ output= (12) -
force
_ quotes? (12) -
force
_ update (12) - grep (12)
-
grep
_ v (10) -
insert
_ output (12) -
install
_ update _ defaults _ str (12) - iseuc (12)
- lazy (12)
- map (12)
-
primitive
_ convert (48) - reject (12)
- replicate (12)
- select (12)
-
slice
_ after (22) -
slice
_ before (36) -
slice
_ when (11) - take (12)
-
take
_ while (24) -
unicode
_ normalize (11) -
unicode
_ normalized? (11) -
valid
_ encoding? (12) -
with
_ index (12) - zip (24)
検索結果
先頭5件
- String
# encode(encoding , from _ encoding , **options) -> String - String
# iseuc -> bool - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol
-
String
# encode(encoding , from _ encoding , **options) -> String (13.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...ようとすると Encoding::UndefinedConversionError が発生する
str = "\u00b7\u2014"
str.encode("Windows-31J", fallback: { "\u00b7" => "\xA5".force_encoding("Windows-31J"),
"\u2014" => "\x81\x5C".force_encoding("Windows-31J") })
//}
@see String#encode!... -
String
# iseuc -> bool (13.0) -
self が EUC-JP なバイト列として正当であるかどうかを判定します。
...5\xf3\xa5\xb0\xb8\xc0\xb8\xec\
\x52\x75\x62\x79".force_encoding('EUC-JP')
sjis_str = "\
\x83\x49\x83\x75\x83\x57\x83\x46\x83\x4e\x83\x67\x8e\x77\x8c\xfc\
\x83\x76\x83\x8d\x83\x4f\x83\x89\x83\x7e\x83\x93\x83\x4f\x8c\xbe\x8c\xea\
\x52\x75\x62\x79".force_encoding('Shift_JIS')
euc_str.iseuc # => true... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (7.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...d_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
ec.insert_output(e... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (7.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...d_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
ec.insert_output(e... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (7.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...d_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
ec.insert_output(e... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (7.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...d_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
ec.insert_output(e... -
Enumerator
:: Lazy # chunk {|elt| . . . } -> Enumerator :: Lazy (7.0) -
Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。
...t[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>
1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]], [false, [4, 5]], [true, [6]], [false, [7, 8]]]
//}
@see Enumerable#chunk... -
Enumerator
:: Lazy # chunk(initial _ state) {|elt , state| . . . } -> Enumerator :: Lazy (7.0) -
Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。
...t[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>
1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]], [false, [4, 5]], [true, [6]], [false, [7, 8]]]
//}
@see Enumerable#chunk... -
Enumerator
:: Lazy # collect {|item| . . . } -> Enumerator :: Lazy (7.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
...クを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.succ }.take(10).force
# => [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
//}
@see Enumerable#map...