716件ヒット
[101-200件を表示]
(0.127秒)
種類
- インスタンスメソッド (527)
- 特異メソッド (74)
- モジュール関数 (48)
- 文書 (36)
- クラス (31)
ライブラリ
- ビルトイン (424)
-
net
/ http (36) -
net
/ pop (24) - openssl (72)
-
rexml
/ document (12) -
rubygems
/ package / tar _ reader / entry (12) - securerandom (12)
- socket (12)
- stringio (28)
- strscan (24)
- win32ole (24)
クラス
-
Encoding
:: Converter (60) -
Encoding
:: InvalidByteSequenceError (84) -
Gem
:: Package :: TarReader :: Entry (12) - IO (14)
-
Net
:: POP3 (24) -
OpenSSL
:: BN (12) -
REXML
:: Child (12) - Random (19)
- Socket (12)
- String (206)
- StringIO (28)
- StringScanner (24)
-
WIN32OLE
_ VARIANT (24)
モジュール
- GC (22)
-
Net
:: HTTPHeader (36) -
OpenSSL
:: Random (48) - SecureRandom (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (1)
- Cipher (12)
- IO (7)
- InvalidByteSequenceError (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
append
_ as _ bytes (1) - byterindex (3)
-
bytes
_ read (12) - bytesize (12)
- byteslice (36)
- bytesplice (10)
- concat (2)
-
content
_ range (12) -
destination
_ encoding (12) -
destination
_ encoding _ name (12) -
each
_ byte (38) - egd (12)
-
egd
_ bytes (12) -
error
_ bytes (12) - getbyte (12)
- getifaddrs (12)
-
incomplete
_ input? (12) -
n
_ bytes (12) -
n
_ mails (12) - new (21)
-
num
_ bytes (12) - peek (12)
- peep (12)
-
primitive
_ convert (24) -
primitive
_ errinfo (12) -
pseudo
_ bytes (12) - putback (24)
-
random
_ bytes (24) - range (12)
-
range
_ length (12) -
readagain
_ bytes (12) - scrub (36)
- scrub! (36)
-
source
_ encoding (12) -
source
_ encoding _ name (12) - stat (22)
- vartype (12)
検索結果
先頭5件
-
StringIO
# bytes {|ch| . . . } -> self (21102.0) -
自身から 1 バイトずつ読み込み、整数 ch に変換し、それを引数として与えられたブロックを実行します。
...変換し、それを引数として与えられたブロックを実行します。
@raise IOError 自身が読み取り不可なら発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge")
a.each_byte{|ch| p ch }
#=> 104
# 111
# 103
# 101
//}
@see IO#each_byte... -
REXML
:: Child # bytes (21101.0) -
@todo
@todo -
Random
# bytes(size) -> String (18213.0) -
ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
...ムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
@param size 結果の文字列のサイズをバイト数で指定します。
//emlist[例][ruby]{
r2 = Random.new(1)
p r2.bytes(10) # => "%\xF4\xC1j\xEB\x80G\xFF\x8C/"
//}
@see Random.bytes... -
Random
. bytes(size) -> String (18213.0) -
ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
...ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
@param size 結果の文字列のサイズをバイト数で指定します。
//emlist[][ruby]{
Random.bytes(10) # => "\xAC\n\x7F\x8C/\xAA\xC4\x97u\xA6"
//}
@see Random#bytes... -
Random
# bytes(size) -> String (18207.0) -
ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
...ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
@param size 結果の文字列のサイズをバイト数で指定します。
//emlist[例][ruby]{
r2 = Random.new(1)
p r2.bytes(10) # => "%\xF4\xC1j\xEB\x80G\xFF\x8C/"
//}... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (15219.0) -
エラー発生時に捨てられたバイト列を返します。
...します。
//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA......1"
puts $!.readagain_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
Encoding
:: InvalidByteSequenceError # source _ encoding -> Encoding (15200.0) -
エラーを発生させた変換の変換元のエンコーディングを Encoding オブジェクトで返します。
...エラーを発生させた変換の変換元のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::InvalidByteSequenceError#destination_encoding,
Encoding::UndefinedConversionError#source_encoding... -
Encoding
:: InvalidByteSequenceError # source _ encoding _ name -> Encoding (15200.0) -
エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#source_encoding... -
Encoding
:: InvalidByteSequenceError (15000.0) -
文字列がそのエンコーディングにおいて不正なバイト列である場合に発生 する例外。
...である場合に発生
する例外。
通常エンコーディング変換時に発生します。
//emlist[例][ruby]{
"\x82\xa0".force_encoding("cp932").encode("UTF-8")
#=> "あ"
"\x82\xa0".force_encoding("EUC-JP").encode("UTF-8")
#=> Encoding::InvalidByteSequenceError: "\x82" on EUC-JP
//}... -
String
# bytesize -> Integer (12200.0) -
文字列のバイト長を整数で返します。
...文字列のバイト長を整数で返します。
//emlist[例][ruby]{
#coding:UTF-8
# 実行結果は文字コードによって異なります。
p "いろは".size #=> 3
p "いろは".bytesize #=> 9
//}
@see String#size... -
String
# byteslice(nth) -> String | nil (12200.0) -
nth バイト目の文字を返します。nth が負の場合は文字列の末尾から数えます。 引数が範囲外を指定した場合は nil を返します。
...合は nil を返します。
@param nth 文字の位置を表す整数を指定します。
@return 切り出した文字列を返します。戻り値の文字エンコーディングは自身
と同じです。
//emlist[例][ruby]{
"hello".byteslice(1) # => "e"
"hello".byteslice(-1) #......=> "o"
"\u3042".byteslice(0) # => "\xE3"
"\u3042".byteslice(1) # => "\x81"
//}
@see String#slice...
