950件ヒット
[201-300件を表示]
(0.124秒)
種類
ライブラリ
クラス
-
ARGF
. class (24) - Array (21)
- CSV (24)
-
CSV
:: Row (12) -
CSV
:: Table (12) -
Digest
:: Base (48) - Encoding (48)
-
Encoding
:: Converter (84) -
Gem
:: Dependency (12) -
Gem
:: Indexer (12) -
Gem
:: Version (12) - IO (48)
- Integer (24)
-
Net
:: FTP (24) -
Net
:: IMAP (24) - Pathname (12)
- Regexp (34)
- Ripper (12)
- String (135)
- Symbol (12)
- Thread (10)
- Time (42)
-
URI
:: FTP (24) -
WIN32OLE
_ VARIANT (12) -
Zlib
:: ZStream (12)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: String (12) - Kconv (12)
- URI (12)
- Zlib (12)
キーワード
- << (12)
- <=> (48)
- BINARY (12)
- IO (12)
- ISASCII (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) - NKF (12)
- Ruby用語集 (12)
- String (12)
-
append
_ as _ bytes (1) -
ascii
_ only? (12) -
asciicompat
_ encoding (24) - asctime (12)
- b (12)
- binary (12)
- binary= (12)
- binmode (12)
- binread (12)
- binwrite (12)
- build (24)
- chr (24)
- compile (11)
- concat (21)
- ctime (12)
-
data
_ type (12) -
default
_ external (12) - downcase (9)
-
encode
_ www _ form (12) - encoding (12)
-
fixed
_ encoding? (12) -
force
_ encoding (12) - generate (12)
- guess (12)
- hexdigest (24)
- hexdigest! (12)
- inspect (42)
-
internal
_ encoding (24) -
locale
_ charmap (12) - name= (10)
-
name
_ list (12) - new (100)
- pack (21)
- pack テンプレート文字列 (12)
- rdoc (12)
- replacement (12)
- replacement= (12)
- sanitize (12)
-
set
_ encoding (12) - sort (12)
-
to
_ json (12) -
to
_ s (24) -
uid
_ sort (12) - unpack (12)
- upcase! (3)
- リテラル (12)
- 正規表現 (12)
検索結果
先頭5件
-
Encoding
:: Converter # replacement -> String (6106.0) -
変換器に設定されている置換文字を返します。
...器に設定されている置換文字を返します。
@return 変換器に設定されている置換文字
//emlist[][ruby]{
ec = Encoding::Converter.new("euc-jp", "us-ascii")
p ec.replacement #=> "?"
ec = Encoding::Converter.new("euc-jp", "utf-8")
p ec.replacement #=> "\uFFFD"
//}... -
Encoding
:: Converter # replacement=(string) (6106.0) -
置換文字を設定します。
...置換文字を設定します。
@param string 変換器に設定する置換文字
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "us-ascii", :undef => :replace)
ec.replacement = "<undef>"
p ec.convert("a \u3042 b") #=> "a <undef> b"
//}... -
IO
# internal _ encoding -> Encoding | nil (6106.0) -
IO の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...エンコーディングが指定されていない場合は nil を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") do |f|
p f.internal_encoding # => nil
f.set_encoding("ASCII-8BIT", "EUC-JP")
p f.internal_encoding # => #<Encoding:EUC-JP>
end
//}... -
IO
. binread(path , length = nil , offset = 0) -> String | nil (6106.0) -
path で指定したファイルを open し、offset の所まで seek し、 length バイト読み込みます。
...。
Kernel.#open と同様 path の先頭が "|" ならば、"|" に続くコマンドの出力を読み取ります。
length を省略するとファイルの末尾まで読み込みます。
ファイルを開くときの mode は "rb:ASCII-8BIT" です。
//emlist[例][ruby]{
IO.write("testf......ine two\nThis is line three\nAnd so on...\n")
IO.binread("testfile") # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
IO.binread("testfile", 20) # => "This is line one\nThi"
IO.binread("testfile", 20, 10) # => "ne one\nThis is line "
//}
@see IO.read... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (6106.0) -
自身から生成した JSON 形式の文字列を返します。
...@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"......puts "test".to_json # => "test"
puts '"'.to_json # => "\""
puts "\\".to_json # => "\\"
puts "𤘩宮城".to_json(ascii_only: true) # => "\ud851\ude29\u5bae\u57ce"
//}... -
Net
:: FTP # binary -> bool (6106.0) -
Net::FTP#put, Net::FTP#get による転送を バイナリモード(IMAGE)で行うかどうかを返します。
...る転送を
バイナリモード(IMAGE)で行うかどうかを返します。
デフォルトの値は true です。
偽の場合、テキストモード(ASCII)が仮定されます。
EBCDIC や LOCAL など他の表現タイプはサポートされていません。
@see Net::FTP#binary=... -
Net
:: FTP # binary=(bool) (6106.0) -
Net::FTP#put, Net::FTP#get による転送を バイナリモード(IMAGE)で転送するかどうかを指定します。
...します。
デフォルトの値は true です。
偽の場合、テキストモード(ASCII)が仮定されます。
EBCDIC や LOCAL など他の表現タイプはサポートされていません。
@param bool 真ならばバイナリモードを on にします。
@see Net::FTP#binary... -
String
# force _ encoding(encoding) -> self (6106.0) -
文字列の持つエンコーディング情報を指定された encoding に変えます。
...もされません。
Array#pack などで得られたバイト列のエンコーディングを指定する時に使います。
@param encoding 変更するエンコーディング情報を表す文字列か Encoding オブジェクトを指定します。
//emlist[例][ruby]{
s = [164, 164, 1......#=> ASCII-8BIT
p s.force_encoding("EUC-JP") #=> "いろは"
p s.force_encoding(Encoding::EUC_JP) #=> "いろは"
u = [12411, 12408, 12392].pack("U*")
u.force_encoding("UTF-8") #=> "ほへと"
u.force_encoding(Encoding::UTF_8)... -
URI
. encode _ www _ form(enum , enc=nil) -> String (6106.0) -
enum から URL-encoded form data を生成します。
...ら URL-encoded form data を生成します。
HTML5 で定義されている application/x-www-form-urlencoded 形式の
文字列を生成します。
enum には通常 [key, value] という形の配列の配列を渡します。
以下の例を見てください。
require 'uri'
URI.enco......de_www_form([["a", "1"], ["b", "2"], ["c", "x yz"]])
# => "a=1&b=2&c=x+yz"
実際には、each のブロック呼び出しで [key, value] の形のデータを渡すものであれば
何でも渡すことができます(例えば Hash など)。
require 'uri'
URI.encode_www_form({"a"=>"1",......ん。そのため
送るデータのエンコーディングを変換したい場合はあらかじめ
変換しておいてください(例えば ASCII incompatible なものを
UTF-8 に変換する場合など)。
各要素のエンコーディングがばらばらの場合もあらかじめエ...