るりまサーチ (Ruby 3.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.173秒)

別のキーワード

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

ライブラリ

キーワード

検索結果

String#split(sep = $;, limit = 0) -> [String] (18451.0)

第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。

..."a,b,c,d,e".split(/,/, 6) # => ["a", "b", "c", "d", "e"]
p "a,b,c,d,e".split(/,/, 7) # => ["a", "b", "c", "d", "e"]
//}

//emlist[limit が負の数の場合は制限なく分割][ruby]{
p "a,b,c,,,".split(/,/, -1) # => ["a", "b", "c", "", "", ""]
//}

@see String#partition, String#rpartition...

String#split(sep = $;, limit = 0) {|s| ... } -> self (18451.0)

第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。

..."a,b,c,d,e".split(/,/, 6) # => ["a", "b", "c", "d", "e"]
p "a,b,c,d,e".split(/,/, 7) # => ["a", "b", "c", "d", "e"]
//}

//emlist[limit が負の数の場合は制限なく分割][ruby]{
p "a,b,c,,,".split(/,/, -1) # => ["a", "b", "c", "", "", ""]
//}

@see String#partition, String#rpartition...

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

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

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


以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることがで...
...!<: little endian signed long
//}

=== 各テンプレート文字の説明

説明中、Array#pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。

: a

ASCII文字列(ヌル文字を詰める/後続する...
...# NaN
[1.0/0.0].pack("f") # => "\x7F\x80\x00\x00" # +Infinity
[-1.0/0.0].pack("f") # => "\xFF\x80\x00\x00" # -Infinity
//}

VAX (NetBSD 3.0) (非IEEE754):
//emlist[][ruby]{
[1.0].pack("f") # => "\x80@\x00\x00"
//}

: d

倍精度浮動小数点数(機種依存)

x86_64 (IEEE754 倍...