るりまサーチ

最速Rubyリファレンスマニュアル検索!
1298件ヒット [201-300件を表示] (0.150秒)
トップページ > クエリ:i[x] > クエリ:ASCII[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. kernel $-i
  5. csv to_i

ライブラリ

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Digest::Base#hexdigest -> String (9116.0)

updateや<<によって追加した文字列に対するハッシュ値を、 ASCIIコードを使って16進数の列を示す文字列にエンコードして返します。

...updateや<<によって追加した文字列に対するハッシュ値を、
ASCII
コードを使って16進数の列を示す文字列にエンコードして返します。

返す文字列は、
MD5では32バイト長、SHA1およびRMD160では40バイト長、SHA256では64バイト長、
SH...
...バイト長です。

Rubyで書くと以下と同じです。

def hexdigest
digest.unpack("H*")[0]
end

例:

# MD5の場合
require 'digest/md5'
digest = Digest::MD5.new
digest.update("ruby")
p digest.hexdigest # => "58e53d1324eef6265fdb97b08ed9aadf"

@see Digest::Base#digest...

Digest::Base#hexdigest! -> String (9116.0)

updateや<<によって追加した文字列に対するハッシュ値を、 ASCIIコードを使って16進数の列を示す文字列にエンコードして返します。 Digest::Base#hexdigestと違い、 メソッドの処理後、 オブジェクトの状態を初期状態(newした直後と同様の状態)に戻します。

...
ASCII
コードを使って16進数の列を示す文字列にエンコードして返します。
Digest::Base#hexdigestと違い、
メソッドの処理後、
オブジェクトの状態を初期状態(newした直後と同様の状態)に戻します。

例:

# MD5の場合
require 'dige...
...st/md5'
digest = Digest::MD5.new
digest.update("ruby")
p digest.hexdigest! # => "58e53d1324eef6265fdb97b08ed9aadf"
p digest.hexdigest! # => "d41d8cd98f00b204e9800998ecf8427e"

@see Digest::Base#hexdigest、Digest::Base#digest!...

Digest::Base.hexdigest(str) -> String (9116.0)

与えられた文字列に対するハッシュ値を、ASCIIコードを使って 16進数の列を示す文字列にエンコードして返します。 new(str).hexdigest と等価です。

...与えられた文字列に対するハッシュ値を、ASCIIコードを使って
16進数の列を示す文字列にエンコードして返します。
new(str).hexdigest と等価です。...

Time#asctime -> String (9112.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 (9112.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"
//}...

絞り込み条件を変える

IO.binwrite(path, string, offset=nil) -> Integer (6306.0)

path で指定されるファイルを開き、string を書き込み、 閉じます。

...path で指定されるファイルを開き、string を書き込み、
閉じます。

ファイルを開くときの mode が "wb:ASCII-8BIT" で、バイナリモードが有効
である点以外は IO.write と同じです。

Kernel.#open と同様 path の先頭が "|" ならば、"|" に...
...ル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置

//emlist[例][ruby]{
# 8x8の真っ白なPNG画像データ。
png = 'iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAAAAADhZOFXAAAADklEQVQIW2P4DwUMlDEA98A/wTjP
QBoAAAAASUVORK5CYII='.unpack('m').first

# 期待する先頭...
...{|c| '%02x' % c }.join(' ')
# => 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52

# binwriteを使用した場合: どの環境でも正しく保存できる。
I
O.binwrite('white.binmode.png', png)
puts IO.binread('white.binmode.png', 16).unpack('C*').map {|c| '%02x' % c }.join(' ')
# => 89 50 4e...

Regexp.compile(string, option = nil, code = nil) -> Regexp (6306.0)

文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

...文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

第一引数が正規表現であれば第一引数を複製して返します。第二、第三引数は警告の上無視されます。

@param string 正規表現を文字列として与えま...
...@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
I
nteger 以外であれば真偽値の指定として見なされ
、真(nil, false 以外)であれば
Regexp::IGNORECASE...
...ングは ASCII-8BIT になります。
それ以外の指定は警告を出力します。

@raise RegexpError 正規表現のコンパイルに失敗した場合発生します。

//emlist[例][ruby]{
str = "This is Regexp"
t1 = Regexp.compile("this is regexp", Regexp::IGNORECASE)
t1...

CSV#inspect -> String (6216.0)

ASCII 互換文字列で自身の情報を表したものを返します。

...
ASCII
互換文字列で自身の情報を表したものを返します。

//emlist[例][ruby]{
require "csv"

csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.inspect # => "<#CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:\",\" row_sep:\"\\n\" quote_char:\"\\\"\">"
//}...

CSV::Row#inspect -> String (6216.0)

ASCII 互換であるエンコーディングの文字列で自身の情報を返します。

...ASCII 互換であるエンコーディングの文字列で自身の情報を返します。

//emlist[例][ruby]{
require "csv"

row = CSV::Row.new(["header1", "header2", "header1"], [1, 2, 3])
row.inspect # => "#<CSV::Row \"header1\":1 \"header2\":2 \"header1\":3>"
//}...

CSV::Table#inspect -> String (6216.0)

モードとサイズを US-ASCII な文字列で返します。

...モードとサイズを US-ASCII な文字列で返します。

//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.inspect # => "#<CSV::Table mode:col_or_row row_count:2>"
//}...

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>