るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.105秒)
トップページ > クエリ:t[x] > クエリ:ruby[x] > クエリ:struct[x] > クラス:String[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

検索結果

String#unpack(template) -> Array (3879.0)

Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。

...ンプレート文字列 template にしたがってアンパックし、
それらの要素を含む配列を返します。

@param template pack テンプレート文字列
@return オブジェクトの配列


以下にあげるものは、Array#pack、String#unpack
のテンプレ...
...明中、Array#pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。

: a

ASCII文字列(ヌル文字を詰める/後続するヌル文字やスペースを残す)
//emlist[][ruby]{
["abc"].pack("a") # =...
...下は、64bitマシンで一般的な結果)
//emlist[][ruby]{
[nil].pack("p") # => "\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00".unpack("p") # => [nil]
//}

: 構造体のアドレス

例えば、
//emlist{
struct
{
int a;
short b;...
...ート文字列 template にしたがってアンパックし、
それらの要素を含む配列を返します。

@param template pack テンプレート文字列
@return オブジェクトの配列


以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテ...