るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

モジュール

キーワード

検索結果

<< < ... 3 4 5 6 7 > >>

Encoding::Converter#replacement -> String (9344.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"
//}...

Time#asctime -> String (9333.0)

時刻を asctime(3) の形式の文字列に変換します。た だし、末尾の改行文字 "\n" は含まれません。

...を asctime(3) の形式の文字列に変換します。た
だし、末尾の改行文字 "\n" は含まれません。

戻り値の文字エンコーディングは Encoding::US_ASCII です。

//emlist[][ruby]{
p Time.local(2000).asctime # => "Sat Jan 1 00:00:00 2000"
p Time.local(...
...2000).asctime.encoding # => #<Encoding:US-ASCII>
p Time.local(2000).ctime # => "Sat Jan 1 00:00:00 2000"
//}...

Time#ctime -> String (9333.0)

時刻を asctime(3) の形式の文字列に変換します。た だし、末尾の改行文字 "\n" は含まれません。

...を asctime(3) の形式の文字列に変換します。た
だし、末尾の改行文字 "\n" は含まれません。

戻り値の文字エンコーディングは Encoding::US_ASCII です。

//emlist[][ruby]{
p Time.local(2000).asctime # => "Sat Jan 1 00:00:00 2000"
p Time.local(...
...2000).asctime.encoding # => #<Encoding:US-ASCII>
p Time.local(2000).ctime # => "Sat Jan 1 00:00:00 2000"
//}...

Encoding#name -> String (9321.0)

エンコーディングの名前を返します。

...エンコーディングの名前を返します。

//emlist[例][ruby]{
Encoding
::UTF_8.name #=> "UTF-8"
//}...

Encoding#names -> String (9320.0)

エンコーディングの名前とエイリアス名の配列を返します。

...エンコーディングの名前とエイリアス名の配列を返します。

//emlist[例][ruby]{
Encoding
::UTF_8.names #=> ["UTF-8", "CP65001"]
//}...

絞り込み条件を変える

Encoding::Converter#replacement=(string) (9232.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"
//}...

Time#inspect -> String (6392.0)

時刻を文字列に変換した結果を返します。

...します。

T
ime#to_s とは異なりナノ秒まで含めて返します。

//emlist[][ruby]{
t
= Time.now
t
.inspect #=> "2012-11-10 18:16:12.261257655 +0100"
t
.strftime "%Y-%m-%d %H:%M:%S.%N %z" #=> "2012-11-10 18:16:12.261257655 +0100"

t
.utc.inspect...
...#=> "2012-11-10 17:16:12.261257655 UTC"
t
.strftime "%Y-%m-%d %H:%M:%S.%N UTC" #=> "2012-11-10 17:16:12.261257655 UTC"
//}

戻り値の文字エンコーディングは Encoding::US_ASCII です。...

Time#to_s -> String (6392.0)

時刻を文字列に変換した結果を返します。 以下のようにフォーマット文字列を使って strftime を呼び出すのと同じです。

...strftime を呼び出すのと同じです。

//emlist[][ruby]{
t
= Time.local(2000,1,2,3,4,5,6)
p t.to_s # => "2000-01-02 03:04:05 +0900"
p t.strftime("%Y-%m-%d %H:%M:%S %z") # => "2000-01-02 03:04:05 +0900"

p t.utc.to_s # => "2000-01-01...
...18:04:05 UTC"
p t.strftime("%Y-%m-%d %H:%M:%S UTC") # => "2000-01-01 18:04:05 UTC"
//}

戻り値の文字エンコーディングは Encoding::US_ASCII です。...

REXML::Instruction#content -> String | nil (6344.0)

XML 処理命令の内容を返します。

...mlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css...
...\" href=\"style.css\""
doc[4].target # => "foobar"
doc[4].content # => nil
//}...

REXML::Instruction#target -> String (6344.0)

XML 処理命令のターゲットを返します。

...ist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\"text/css\" href=\"sty...

絞り込み条件を変える

<< < ... 3 4 5 6 7 > >>