るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.137秒)
トップページ > バージョン:2.2.0[x] > クエリ:Encoding::US_ASCII[x]

別のキーワード

  1. new openssl::bn
  2. new openssl::asn1::asn1data
  3. new openssl::pkey::ec::group
  4. new openssl::x509::certificate
  5. start net::smtp

ライブラリ

クラス

キーワード

検索結果

Encoding.compatible?(obj1, obj2) -> Encoding | nil (19.0)

2つのオブジェクトのエンコーディングに関する互換性をチェックします。 互換性がある場合はそのエンコーディングを、 ない場合は nil を返します。

2つのオブジェクトのエンコーディングに関する互換性をチェックします。
互換性がある場合はそのエンコーディングを、
ない場合は nil を返します。

引数が両方とも文字列である場合、互換性があるならば
その文字列を結合できます。この場合返り値のエンコーディングは
結合した文字列が取るであろう Encoding オブジェクトを返します。

//emlist[例][ruby]{
Encoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b")
#=> #<Encoding:ISO-8859-1>

Encoding.compatible?...

Ripper#encoding -> Encoding (19.0)

自身の持つ Ruby プログラムの文字エンコーディングを返します。

自身の持つ Ruby プログラムの文字エンコーディングを返します。

Ruby プログラムの解析前は Encoding::US_ASCII を返します。

Time#asctime -> String (19.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 Ja...

Time#ctime -> String (19.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 Ja...

Time#to_s -> String (19.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 #...

絞り込み条件を変える