別のキーワード
クラス
-
ARGF
. class (33) -
Encoding
:: Converter (44) - Regexp (11)
- String (119)
- Symbol (32)
キーワード
- capitalize (16)
- capitalize! (8)
- downcase (16)
- downcase! (8)
- encode (33)
- encode! (22)
-
primitive
_ convert (44) -
set
_ encoding (33) - swapcase (16)
- swapcase! (8)
- upcase (16)
- upcase! (8)
検索結果
先頭5件
- Regexp
# options -> Integer - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol - ARGF
. class # set _ encoding(enc _ str , options = {}) -> self - ARGF
. class # set _ encoding(ext _ enc , int _ enc , options = {}) -> self
-
Regexp
# options -> Integer (12252.0) -
正規表現の生成時に指定されたオプションを返します。戻り値は、 Regexp::EXTENDED, Regexp::IGNORECASE, Regexp::MULTILINE, Regexp::FIXEDENCODING, Regexp::NOENCODING, の論理和です。
...GNORECASE # => 1
p //i.options # => 1
p Regexp.new("foo", Regexp::IGNORECASE ).options # => 1
p Regexp.new("foo", Regexp::EXTENDED).options # => 2
p Regexp.new("foo", Regexp::IGNORECASE | Regexp::EXTENDED).options # => 3
p Regexp.new("foo", Regexp::MULTILINE).options # => 4
p Regexp.new("......foo", Regexp::IGNORECASE | Regexp::MULTILINE ).options # => 5
p Regexp.new("foo", Regexp::MULTILINE | Regexp::EXTENDED).options # =>6
p Regexp.new("foo", Regexp::IGNORECASE | Regexp::MULTILINE | Regexp::EXTENDED).options # => 7
//}... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (516.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...tion_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
optio......stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_fu......mitive_errinfo]
case ret
when :invalid_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... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (316.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...tion_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
optio......stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_fu......mitive_errinfo]
case ret
when :invalid_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... -
ARGF
. class # set _ encoding(enc _ str , options = {}) -> self (217.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
...介して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで......ます。
@param int_enc 内部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@param options エンコーディング変換のオプション。
String#encode と同じものが指定できます。
@see String#encode... -
ARGF
. class # set _ encoding(ext _ enc , int _ enc , options = {}) -> self (217.0) -
ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。
...介して読み込むファイルの、
内部エンコーディングは読み込んだ文字列のエンコーディングです。
詳しくは IO#set_encoding を参照してください。
@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで......ます。
@param int_enc 内部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@param options エンコーディング変換のオプション。
String#encode と同じものが指定できます。
@see String#encode... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (216.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...tion_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
optio......stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_fu......mitive_errinfo]
case ret
when :invalid_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... -
String
# capitalize!(*options) -> self | nil (210.0) -
文字列先頭の文字を大文字に、残りを小文字に破壊的に変更します。
...文字列先頭の文字を大文字に、残りを小文字に破壊的に変更します。
@param options オプションの詳細は String#downcase を参照してください。
@return capitalize! は self を変更して返しますが、
変更が起こらなかった場合は ni... -
String
# capitalize(*options) -> String (210.0) -
文字列先頭の文字を大文字に、残りを小文字に変更した文字列を返します。
...文字列先頭の文字を大文字に、残りを小文字に変更した文字列を返します。
@param options オプションの詳細は String#downcase を参照してください。
//emlist[例][ruby]{
p "foobar--".capitalize # => "Foobar--"
p "fooBAR--".capitalize # => "Foobar--"... -
String
# downcase!(*options) -> self | nil (210.0) -
全ての大文字を対応する小文字に破壊的に置き換えます。 どの文字がどう置き換えられるかは、オプションの有無や文字列のエンコーディングに依存します。
...どの文字がどう置き換えられるかは、オプションの有無や文字列のエンコーディングに依存します。
@param options オプションの詳細は String#downcase を参照してください。
@return self を変更して返します。変更が無かった場合... -
String
# downcase(*options) -> String (210.0) -
全ての大文字を対応する小文字に置き換えた文字列を返します。 どの文字がどう置き換えられるかは、オプションの有無や文字列のエンコーディングに依存します。
...どの文字がどう置き換えられるかは、オプションの有無や文字列のエンコーディングに依存します。
@param options オプションの意味は以下の通りです。
: オプションなし
完全な Unicode ケースマッピングに対応し、ほとん... -
String
# swapcase!(*options) -> self | nil (210.0) -
大文字を小文字に、小文字を大文字に破壊的に変更します。
...大文字を小文字に、小文字を大文字に破壊的に変更します。
@param options オプションの詳細は String#downcase を参照してください。
swapcase! は self を変更して返しますが、
置換が起こらなかった場合は nil を返します。
この...