154件ヒット
[101-154件を表示]
(0.057秒)
種類
- インスタンスメソッド (132)
- 特異メソッド (22)
クラス
- Refinement (3)
- Regexp (22)
- String (129)
キーワード
- codepoints (22)
- compile (11)
-
each
_ codepoint (22) - encode (33)
- encode! (22)
-
import
_ methods (3) - new (11)
-
unicode
_ normalize (10) -
unicode
_ normalize! (10) -
unicode
_ normalized? (10)
検索結果
先頭5件
-
String
# each _ codepoint -> Enumerator (27108.0) -
文字列の各コードポイントに対して繰り返します。
...ます。
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
"hello わーるど".encode('euc-jp').each_codepoint.to_a
# => [104, 101, 108, 108, 111, 32, 42223, 41404, 42219, 42185]
//}
@see String#codepoints... -
String
# encode!(encoding , from _ encoding , options = nil) -> self (27108.0) -
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。
...す。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@return 変換後のself
//emlist[例][ruby]{
#coding:UTF-8
s = "いろは"
s.encode!("EUC-JP")
s.encode!(Encoding::UTF_8)
//}
@see String#encode... -
String
# encode!(encoding , options = nil) -> self (27108.0) -
self を指定したエンコーディングに変換し、自身を置き換えます。引数を2つ 与えた場合、第二引数は変換元のエンコーディングを意味します。さもなくば self のエンコーディングが使われます。変換後の self を返します。
...す。
@param from_encoding 変換元のエンコーディングを表す文字列か Encoding オブジェクトを指定します。
@return 変換後のself
//emlist[例][ruby]{
#coding:UTF-8
s = "いろは"
s.encode!("EUC-JP")
s.encode!(Encoding::UTF_8)
//}
@see String#encode... -
Regexp
. compile(string , option = nil , code = nil) -> Regexp (234.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。
@param string 正規表現を文字列として与えま......して見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と同じになります。
@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8BIT になります。
それ... -
Regexp
. new(string , option = nil , code = nil) -> Regexp (234.0) -
文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
...文字列 string をコンパイルして正規表現オブジェクトを生成して返します。
第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。
@param string 正規表現を文字列として与えま......して見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE の指定と同じになります。
@param code "n", "N" が与えられた時には、生成された正規表現のエンコーディングは ASCII-8BIT になります。
それ... -
Refinement
# import _ methods(*modules) -> self (20.0) -
モジュールからメソッドをインポートします。
...level)
' ' * level + self
end
end
module M
refine String do
import_methods StrUtils
end
end
using M
p "foo".indent(3) # => " foo"
module M
refine String do
import_methods Enumerable
# Can't import method which is not defined with Ruby code: Enumerable#drop
end
end
//}...