るりまサーチ

最速Rubyリファレンスマニュアル検索!
120件ヒット [101-120件を表示] (0.076秒)

別のキーワード

  1. string []=
  2. string slice
  3. string []
  4. string slice!
  5. string gsub

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 >>

Encoding::Converter#putback(max_numbytes) -> String (120.0)

後の変換用に変換器内部で保持しているバイト列を max_numbytes で指定した バイト数だけ返します。max_numbytes を指定しなかった場合は保持しているバ イト列の全てを返します。

...得するバイト列の最大値

@return 格納されていたバイト列

//emlist[][ruby]{
ec = Encoding::Converter.new("utf-16le", "iso-8859-1")
src
= "\x00\xd8\x61\x00"
dst = ""
p ec.primitive_convert(src, dst) #=> :invalid_byte_sequence
p ec.primitive_errinfo #=> [:invalid_byte_sequenc...

Kernel$$LAST_PAREN_MATCH -> String | nil (119.0)

$+ の別名

...require "English"

r1 = Regexp.compile("<img src=(http:.+?)>")
r2 = Regexp.compile("<a href=(http|ftp).+?>(.+?)</a>")

while line = DATA.gets
[ r1, r2 ].each {|rep|
rep =~ line
p $+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikkou</td> <td><a...
...href=http://localhost/link.html>link</a></td> </tr>
#enf of sample.rb

$ ruby sample.rb
"http://localhost/a.jpg"
"link"...
<< < 1 2 >>