種類
ライブラリ
- English (12)
- ビルトイン (144)
-
cgi
/ html (48) - digest (12)
- erb (12)
- fileutils (187)
- mkmf (228)
-
net
/ smtp (36) - rake (12)
-
rexml
/ document (24) - ripper (24)
-
ripper
/ filter (12) -
ripper
/ lexer (48) -
ripper
/ sexp (24) -
rubygems
/ dependency _ list (12) -
rubygems
/ package (12) -
shell
/ filter (6) - socket (120)
- uri (24)
- win32ole (12)
クラス
-
Digest
:: Base (12) - ERB (12)
-
Encoding
:: Converter (108) -
Gem
:: DependencyList (12) - IO (24)
-
Net
:: SMTP (36) -
REXML
:: ElementDecl (12) -
REXML
:: ExternalEntity (12) - Ripper (96)
-
Ripper
:: Filter (12) -
Shell
:: Filter (6) - Socket (108)
- String (12)
-
URI
:: Generic (24) -
WIN32OLE
_ TYPE (12)
モジュール
-
CGI
:: HtmlExtension (48) - FileUtils (175)
-
Gem
:: Package (12) - Kernel (240)
-
Socket
:: Constants (12)
キーワード
-
$ LAST _ PAREN _ MATCH (12) -
$ srcdir (12) - - (12)
- < (6)
- ESRCH (12)
- FileUtils (12)
-
IP
_ SENDSRCADDR (24) -
OBJ
_ INFECT (12) - compile (12)
- copy (12)
-
copy
_ entry (12) -
copy
_ fds (12) -
copy
_ file (12) -
copy
_ stream (36) - cp (12)
-
cp
_ lr (7) -
cp
_ r (12) -
create
_ makefile (12) -
create
_ tmpsrc (12) -
dummy
_ makefile (12) -
egrep
_ cpp (24) - eval (12)
-
eval
_ under (12) - file (12)
-
find
_ bad _ fds (12) -
from
_ source _ index (12) - img (24)
-
insert
_ output (12) - install (12)
-
install
_ files (12) -
install
_ rb (12) -
intersect
_ fds (12) -
irb
/ src _ encoding (12) -
last
_ error (12) - lex (12)
- link (12)
- ln (12)
-
ln
_ s (12) -
ln
_ sf (12) -
log
_ src (12) -
match
_ fds (12) - move (12)
- mv (12)
- new (48)
- pack (12)
- parse (12)
- pathmap (12)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - putback (24)
-
route
_ from (12) -
ruby 1
. 9 feature (12) -
send
_ mail (12) - sendmail (12)
- sexp (12)
-
sexp
_ raw (12) - slice (12)
-
src
_ type (12) - symlink (12)
-
token
_ match (12) - tokenize (12)
-
try
_ compile (24) -
try
_ cpp (24) -
try
_ do (24) -
try
_ link (24) -
try
_ run (24) -
udp
_ server _ loop (24) -
udp
_ server _ loop _ on (12) -
udp
_ server _ recv (12) -
udp
_ server _ sockets (48)
検索結果
先頭5件
- Encoding
:: Converter # insert _ output(string) -> nil - Encoding
:: Converter # primitive _ errinfo -> Array - CGI
:: HtmlExtension # img(attributes) -> String - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol
-
Encoding
:: Converter # insert _ output(string) -> nil (60.0) -
変換器内のバッファに文字列を挿入します。 バッファに保持された文字列は、次の変換時の変換結果と一緒に返されます。
...-8859-1")
src = "HIRAGANA LETTER A is \u{3042}."
dst = ""
p ec.primitive_convert(src, dst) #=> :undefined_conversion
puts "[#{dst.dump}, #{src.dump}]" #=> ["HIRAGANA LETTER A is ", "."]
ec.insert_output("<err>")
p ec.primitive_convert(src, dst) #=> :finished
puts "[#{dst.dump}, #{src.dump}]".......", ""]
ec = Encoding::Converter.new("utf-8", "iso-2022-jp")
src = "\u{306F 3041 3068 2661 3002}" # U+2661 is not representable in iso-2022-jp
dst = ""
p ec.primitive_convert(src, dst) #=> :undefined_conversion
puts "[#{dst.dump}, #{src.dump}]" #=> ["\e$B$O$!$H".force_encoding("ISO-2022-JP"),......"\xE3\ x80\x82"]
ec.insert_output "?" # state change required to output "?".
p ec.primitive_convert(src, dst) #=> :finished
puts "[#{dst.dump}, #{src.dump}]" #=> ["\e$B$O$!$H\e(B?\e$B!#\e(B".force_encoding("ISO-20 22-JP"), ""]
//}... -
Encoding
:: Converter # primitive _ errinfo -> Array (54.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
...は難しいでしょう。
//emlist[][ruby]{
# \xff is invalid as EUC-JP.
ec = Encoding::Converter.new("EUC-JP", "Shift_JIS")
ec.primitive_convert(src="\xff", dst="", nil, 10)
p ec.primitive_errinfo
#=> [:invalid_byte_sequence, "EUC-JP", "Shift_JIS", "\xFF", ""]
# HIRAGANA LETTER A (\xa4\xa2 in E......O-8859-1")
ec.primitive_convert(src="\xa4\xa2", dst="", nil, 10)
p ec.primitive_errinfo
#=> [:undefined_conversion, "UTF-8", "ISO-8859-1", "\xE3\x81\x82", ""]
# partial character is invalid
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
ec.primitive_convert(src="\xa4", dst="", nil, 10)
p ec.p......:Converter::PARTIAL_INPUT prevents invalid errors by
# partial characters.
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
ec.primitive_convert(src="\xa4", dst="", nil, 10, Encoding::Converter::PARTIAL_INPUT)
p ec.primitive_errinfo
#=> [:source_buffer_empty, nil, nil, nil, nil]
# \xd8\x00\x00@... -
CGI
:: HtmlExtension # img(attributes) -> String (30.0) -
img 要素を生成します。
...img 要素を生成します。
@param attributes 属性をハッシュで指定します。
例:
img({ "SRC" => "src", "ALT" => "alt", "WIDTH" => 100, "HEIGHT" => 50 })
# <IMG SRC="src" ALT="alt" WIDTH="100" HEIGHT="50">... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (18.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...rce_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec.pr... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (18.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...rce_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec.pr... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (18.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...rce_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec.pr... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (18.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...rce_buffer_empty
* :finished
//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''
begin
ret = ec.primitive_convert(src, dst)
p [ret, src, dst, ec.primitive_errinfo]
case ret
when :invalid_byte_sequence
ec.insert_output(ec.pr... -
String
# pathmap(spec = nil) { . . . } -> String (18.0) -
与えられた書式指定文字列に応じてパス(自身)を変換します。
...old,new;src,bin}d")
正規表現や後方参照をパターンとして使用することがあるかもしれません。
中括弧、コンマ、セミコロンはパターンと置換文字列に使用しないでください。
例:
"src/org/onestepback/proj/A.java".pathmap("%{^src,bin}X.c... -
CGI
:: HtmlExtension # image _ button(attributes) -> String (17.0) -
タイプが image の input 要素を生成します。
...タイプが image の input 要素を生成します。
@param attributes 属性をハッシュで指定します。
例:
image_button({ "SRC" => "url", "ALT" => "string" })
# <INPUT TYPE="image" SRC="url" ALT="string">... -
Encoding
:: Converter # last _ error -> Exception | nil (12.0) -
直前に変換器で発生した例外に相当する例外オブジェクトを返します。 直前の変換で例外が発生していない場合は nil を返します。
...:Converter.new("utf-8", "iso-8859-1")
p ec.primitive_convert(src="\xf1abcd", dst="") #=> :invalid_byte_sequence
p ec.last_error #=> #<Encoding::InvalidByteSequenceError: "\xF1" followed by "a" on UTF-8>
p ec.primitive_convert(src, dst, nil, 1) #=> :destination_buffer_full
p ec...