6件ヒット
[1-6件を表示]
(0.054秒)
種類
- インスタンスメソッド (4)
- 特異メソッド (2)
クラス
-
Encoding
:: Converter (2) - Random (2)
- String (2)
キーワード
- bytesize (1)
- new (1)
-
primitive
_ convert (2)
検索結果
先頭5件
- Random
# bytes(size) -> String - Random
. bytes(size) -> String - String
# bytesize -> Integer - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol
-
Random
# bytes(size) -> String (54703.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 (54703.0) -
ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
@param size 結果の文字列のサイズをバイト数で指定します。
//emlist[][ruby]{
Random.bytes(10) # => "\xAC\n\x7F\x8C/\xAA\xC4\x97u\xA6"
//}
@see Random#bytes -
String
# bytesize -> Integer (36661.0) -
文字列のバイト長を整数で返します。
文字列のバイト長を整数で返します。
//emlist[例][ruby]{
#coding:UTF-8
# 実行結果は文字コードによって異なります。
p "いろは".size #=> 3
p "いろは".bytesize #=> 9
//}
@see String#size -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (715.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (715.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
String
. new(string = "" , encoding: string . encoding , capacity: string . bytesize) -> String (679.0) -
string と同じ内容の新しい文字列を作成して返します。 引数を省略した場合は空文字列を生成して返します。
string と同じ内容の新しい文字列を作成して返します。
引数を省略した場合は空文字列を生成して返します。
@param string 文字列
@param encoding 作成する文字列のエンコーディングを文字列か
Encoding オブジェクトで指定します(変換は行われま
せん)。省略した場合は引数 string のエンコーディングと同
じになります(ただし、string が指定されていなかった場合は
Encoding::ASCII_8BITになります...