種類
ライブラリ
- ビルトイン (635)
- base64 (72)
-
cgi
/ html (24) - digest (12)
- erb (12)
- json (12)
- kconv (24)
-
net
/ ftp (60) -
net
/ http (36) -
net
/ imap (84) - nkf (12)
- openssl (72)
- rake (24)
-
rdoc
/ code _ object (240) -
rdoc
/ context (12) - resolv (24)
- rss (24)
- stringio (38)
- uri (112)
-
webrick
/ httpstatus (96) -
win32
/ registry (12) - win32ole (48)
- zlib (24)
クラス
-
ARGF
. class (38) - Encoding (368)
- IO (38)
-
Net
:: FTP (60) -
Net
:: HTTPResponse (36) -
Net
:: IMAP (36) -
Net
:: IMAP :: ResponseCode (24) -
Net
:: IMAP :: ResponseText (12) -
OpenSSL
:: Config (12) -
OpenSSL
:: OCSP :: BasicResponse (12) -
RDoc
:: CodeObject (228) - Refinement (4)
- Regexp (22)
- String (153)
- StringIO (38)
-
URI
:: FTP (36) - WIN32OLE (36)
-
Win32
:: Registry :: Error (12) -
Zlib
:: GzipFile (12)
モジュール
- Base64 (72)
-
CGI
:: HtmlExtension (24) - Digest (12)
-
ERB
:: Util (12) - Kconv (12)
- Kernel (12)
-
OpenSSL
:: ASN1 (24) -
OpenSSL
:: X509 (12) -
RSS
:: ContentModel (24) - RakeFileUtils (24)
- URI (76)
-
WEBrick
:: HTTPStatus (96) - Zlib (12)
キーワード
-
$ KCODE (12) -
CODE
_ CLASS _ TO _ OBJ (12) -
CODE
_ TO _ OBJ (12) - CP437 (12)
- CP720 (4)
- CP737 (12)
- CP775 (12)
- CP850 (12)
- CP852 (12)
- CP855 (12)
- CP857 (12)
- CP860 (12)
- CP861 (12)
- CP862 (12)
- CP863 (12)
- CP864 (12)
- CP865 (12)
- CP866 (12)
- CP869 (12)
- CodeObject (12)
- Context (12)
- ConverterNotFoundError (12)
- DecodeError (12)
- EncodeError (12)
- HMAC (12)
- IBM437 (12)
- IBM720 (4)
- IBM737 (12)
- IBM775 (12)
- IBM850 (12)
- IBM852 (12)
- IBM855 (12)
- IBM857 (12)
- IBM860 (12)
- IBM861 (12)
- IBM862 (12)
- IBM863 (12)
- IBM864 (12)
- IBM865 (12)
- IBM866 (12)
- IBM869 (12)
- MissingUnicodeSupport (12)
-
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - NKF (12)
-
OS
_ CODE (12) - ResponseCode (12)
- Ruby用語集 (12)
-
V
_ ERR _ UNABLE _ TO _ DECODE _ ISSUER _ PUBLIC _ KEY (12) - WIN32OLE (12)
- [] (12)
-
client
_ error? (12) - codepage (12)
- codepage= (12)
- codepoints (66)
- comment (12)
- comment= (12)
- compile (11)
-
content
_ encoded (12) -
content
_ encoded= (12) - data (12)
- decode (19)
- decode64 (12)
-
decode
_ all (12) -
decode
_ utf7 (12) -
decode
_ www _ form (12) -
decode
_ www _ form _ component (12) -
document
_ children (12) -
document
_ children= (12) -
document
_ self (12) -
document
_ self= (12) - documented? (12)
- drb (12)
- each (12)
-
each
_ codepoint (96) - encode (43)
- encode! (24)
- encode64 (12)
-
encode
_ utf7 (12) -
encode
_ www _ form (12) -
encode
_ www _ form _ component (12) - error? (12)
- escape (7)
- form (24)
- hexencode (12)
-
import
_ methods (4) - info? (12)
- kconv (36)
-
last
_ response (12) -
last
_ response _ code (12) - lastresp (12)
- locale= (12)
- name (12)
- new (23)
- new2 (12)
- nowrite (12)
-
os
_ code (12) - parent (12)
- parent= (12)
-
parent
_ file _ name (12) -
parent
_ name (12) - rake (12)
-
rdoc
/ code _ object (12) -
rdoc
/ code _ objects (12) -
rdoc
/ generator / json _ index (12) -
rdoc
/ markdown (12) -
reason
_ phrase (12) - redirect? (12)
-
remove
_ classes _ and _ modules (12) -
remove
_ methods _ etc (12) -
return
_ code (12) -
return
_ code= (12) -
rexml
/ document (12) - section (12)
- section= (12)
-
server
_ error? (12) -
start
_ doc (12) - status (12)
-
stop
_ doc (12) -
strict
_ decode64 (12) -
strict
_ encode64 (12) - success? (12)
-
test
/ unit (12) - typecode (12)
- typecode= (12)
- unescape (7)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) -
url
_ encode (12) -
urlsafe
_ decode64 (12) -
urlsafe
_ encode64 (12) - verbose (12)
- xlist (12)
- xmlrpc (3)
検索結果
先頭5件
-
RSS
:: ContentModel # content _ encoded= (6100.0) -
@todo
@todo -
String
# codepoints -> [Integer] (6100.0) -
文字列の各コードポイントの配列を返します。(self.each_codepoint.to_a と同じです)
...の配列を返します。(self.each_codepoint.to_a と同じです)
//emlist[例][ruby]{
#coding:UTF-8
"hello わーるど".codepoints
# => [104, 101, 108, 108, 111, 32, 12431, 12540, 12427, 12393]
//}
ブロックが指定された場合は String#each_codepoint と同じように動作しま......す。
Ruby 2.6 までは deprecated の警告が出ますが、Ruby 2.7 で警告は削除されました。
@see String#each_codepoint... -
String
# each _ codepoint -> Enumerator (6100.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 (6100.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 (6100.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(**options) -> String (6100.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...:replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエンコーディングならば U+FFFD、それ以外では "?" です。
: :fallback => Hash | Proc | Method
未定義の文字に対す......"いろは"
s.encode("EUC-JP")
s.encode(Encoding::UTF_8)
# U+00B7 MIDDLE DOT, U+2014 EM DASH は対応する文字が Windows-31J には
# 存在しないのでそのまま変換しようとすると 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
# encode(encoding , **options) -> String (6100.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...:replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエンコーディングならば U+FFFD、それ以外では "?" です。
: :fallback => Hash | Proc | Method
未定義の文字に対す......"いろは"
s.encode("EUC-JP")
s.encode(Encoding::UTF_8)
# U+00B7 MIDDLE DOT, U+2014 EM DASH は対応する文字が Windows-31J には
# 存在しないのでそのまま変換しようとすると 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
# encode(encoding , from _ encoding , **options) -> String (6100.0) -
self を指定したエンコーディングに変換した文字列を作成して返します。引数 を2つ与えた場合、第二引数は変換元のエンコーディングを意味します。さもな くば self のエンコーディングが使われます。 無引数の場合は、Encoding.default_internal が nil でなければそれが変換先のエンコーディングになり、かつ :invalid => :replace と :undef => :replace が指定されたと見なされ、nil ならば変換は行われません。
...:replace => string
前述の :invalid => :replace や :undef => :replace で用いられる置換文字を指定します。デフォルトは Unicode 系のエンコーディングならば U+FFFD、それ以外では "?" です。
: :fallback => Hash | Proc | Method
未定義の文字に対す......"いろは"
s.encode("EUC-JP")
s.encode(Encoding::UTF_8)
# U+00B7 MIDDLE DOT, U+2014 EM DASH は対応する文字が Windows-31J には
# 存在しないのでそのまま変換しようとすると 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
# unicode _ normalize!(form = :nfc) -> self (6100.0) -
self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し た文字列に置き換えます。
...self を NFC、NFD、NFKC、NFKD のいずれかの正規化形式で Unicode 正規化し
た文字列に置き換えます。
(gsub!などと異なり)変換が行なわれなくても self を返します。
@param form 正規化形式を :nfc、:nfd、:nfkc、:nfkd のいずれかで指定し......Unicode 文字列ではない場合
に発生します。
//emlist[例][ruby]{
text = "a\u0300"
text.unicode_normalize!(:nfc)
text == "\u00E0" # => true
text.unicode_normalize!(:nfd)
text == "a\u0300" # => true
//}
@see String#unicode_no......rmalize, String#unicode_normalized?...