6件ヒット
[1-6件を表示]
(0.078秒)
クラス
-
Encoding
:: Converter (2) - Random (1)
- String (1)
- StringScanner (2)
キーワード
- bytesize (1)
- peek (1)
- peep (1)
-
primitive
_ convert (2)
検索結果
先頭5件
- 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 - StringScanner
# peek(bytes) -> String
-
Random
# bytes(size) -> String (54664.0) -
ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
ランダムなバイナリー文字列を返します。結果の文字列のサイズを指定できます。
@param size 結果の文字列のサイズをバイト数で指定します。
//emlist[例][ruby]{
r2 = Random.new(1)
p r2.bytes(10) # => "%\xF4\xC1j\xEB\x80G\xFF\x8C/"
//}
@see Random.bytes -
String
# bytesize -> Integer (36640.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 (604.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 (604.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
StringScanner
# peek(bytes) -> String (448.0) -
スキャンポインタから長さ bytes バイト分だけ文字列を返します。
スキャンポインタから長さ bytes バイト分だけ文字列を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.peek(4) # => "test"
//}
また、このメソッドを実行してもスキャンポインタは移動しません。
StringScanner#peep は将来のバージョンでは削除される予定です。
代わりに StringScanner#peek を使ってください。
@param bytes 0 以上の整数を指定します。
ただし、スキャン対象の... -
StringScanner
# peep(bytes) -> String (448.0) -
スキャンポインタから長さ bytes バイト分だけ文字列を返します。
スキャンポインタから長さ bytes バイト分だけ文字列を返します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.peek(4) # => "test"
//}
また、このメソッドを実行してもスキャンポインタは移動しません。
StringScanner#peep は将来のバージョンでは削除される予定です。
代わりに StringScanner#peek を使ってください。
@param bytes 0 以上の整数を指定します。
ただし、スキャン対象の...