るりまサーチ

最速Rubyリファレンスマニュアル検索!
360件ヒット [1-100件を表示] (0.132秒)
トップページ > クエリ:-[x] > クエリ:a[x] > クエリ:split[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

検索結果

<< 1 2 3 ... > >>

Pathname#split -> Array (21329.0)

File.split(self.to_s) と同じです。

...File.split(self.to_s) と同じです。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("/path/to/sample")
pathname.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split...

Shell::CommandProcessor#split(pathname) -> [String] (21307.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param pathname パス名を表す文字列を指定します。

@see File.split...

BigDecimal#split -> [Integer, String, Integer, Integer] (21235.0)

BigDecimal 値を 0.xxxxxxx*10**n と表現したときに、 符号 (NaNのときは 0、それ以外は+1か-1になります)、 仮数部分の文字列("xxxxxxx")と、基数(10)、更に指数 n を配列で返します。

...BigDecimal 値を 0.xxxxxxx*10**n と表現したときに、
符号 (NaNのときは 0、それ以外は+1か-1になります)、
仮数部分の文字列("xxxxxxx")と、基数(10)、更に指数 n を配列で返します。

//emlist[][ruby]{
require "bigdecimal"
a
= BigDecimal("3.14159265")
f...
..., x, y, z = a.split
//}

とすると、f = 1、x = "314159265"、y = 10、z = 1 になります。
従って、以下のようにする事で Float に変換することができます。

//emlist[][ruby]{
s = "0."+x
b = f*(s.to_f)*(y**z)
//}

@see BigDecimal#to_f...

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

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

...@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数

@return ブロックを渡した場合は self、ブロックなしの場合は配列

//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a", "b", "c"]

p " a...
...\n c".split(nil) # => ["a", "b", "c"]
p " a \t b \n c".split(' ') # => ["a", "b", "c"] # split(nil) と同じ
p " a \t b \n c".split # => ["a", "b", "c"] # split(nil) と同じ
//}

//emlist[括弧を含む正規表現][ruby]{
p '1-10,20'.split(/([-,])/) # => ["1", "-", "10...
...re'.split(/\s*/).join(':') # => "h:i:t:h:e:r:e"
//}

//emlist[文字列全体を 1 文字ずつに分割する例][ruby]{
p 'hi there'.split(//).join(':') # => "h:i: :t:h:e:r:e"
//}

//emlist[limit == 0 だと制限なく分割、配列末尾の空文字列は取り除かれる][ruby]{
p "a,b,c...

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

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

...@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数

@return ブロックを渡した場合は self、ブロックなしの場合は配列

//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a", "b", "c"]

p " a...
...\n c".split(nil) # => ["a", "b", "c"]
p " a \t b \n c".split(' ') # => ["a", "b", "c"] # split(nil) と同じ
p " a \t b \n c".split # => ["a", "b", "c"] # split(nil) と同じ
//}

//emlist[括弧を含む正規表現][ruby]{
p '1-10,20'.split(/([-,])/) # => ["1", "-", "10...
...re'.split(/\s*/).join(':') # => "h:i:t:h:e:r:e"
//}

//emlist[文字列全体を 1 文字ずつに分割する例][ruby]{
p 'hi there'.split(//).join(':') # => "h:i: :t:h:e:r:e"
//}

//emlist[limit == 0 だと制限なく分割、配列末尾の空文字列は取り除かれる][ruby]{
p "a,b,c...

絞り込み条件を変える

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

第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。

...

@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数


//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a", "b", "c"]

p " a \t b \n c".split(nil) # => ["a", "b", "c"]
p " a \t b \n c".split(' ')...
...# => ["a", "b", "c"] # split(nil) と同じ
p " a \t b \n c".split # => ["a", "b", "c"] # split(nil) と同じ
//}

//emlist[括弧を含む正規表現][ruby]{
p '1-10,20'.split(/([-,])/) # => ["1", "-", "10", ",", "20"]
//}

//emlist[正規表現が空文字列にマッチする...
...re'.split(/\s*/).join(':') # => "h:i:t:h:e:r:e"
//}

//emlist[文字列全体を 1 文字ずつに分割する例][ruby]{
p 'hi there'.split(//).join(':') # => "h:i: :t:h:e:r:e"
//}

//emlist[limit == 0 だと制限なく分割、配列末尾の空文字列は取り除かれる][ruby]{
p "a,b,c...

Shell#split(pathname) -> [String] (18307.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param pathname パス名を表す文字列を指定します。

@see File.split...

Shell::Filter#split(pathname) -> [String] (18307.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param pathname パス名を表す文字列を指定します。

@see File.split...

File.split(pathname) -> [String] (18301.0)

pathname を dirname とbasename に分割して、2 要 素の配列を返します。

...pathname を dirname とbasename に分割して、2 要
素の配列を返します。

//emlist[][ruby]{
[File.dirname(pathname), File.basename(pathname)]
//}

と同じです。

@param pathname パス名を表す文字列を指定します。...

FileUtils#split_all(path) -> Array (12319.0)

与えられたパスをディレクトリごとに分割します。

...与えられたパスをディレクトリごとに分割します。

@param path 分割するパスを指定します。

例:
split
_all("a/b/c") # => ['a', 'b', 'c']...

絞り込み条件を変える

WEBrick::HTTPUtils.#split_header_value(str) -> Array (12301.0)

HTTP ヘッダの値を分割して返します。

...HTTP ヘッダの値を分割して返します。

@param str HTTP ヘッダの値を返します。...

Kernel$$-a -> bool (12229.0)

自動 split モードを表すフラグです。

...自動 split モードを表すフラグです。

コマンドラインオプション -a を使ったとき true に設定されます。
この変数には代入できません。

この変数はグローバルスコープです。

@see spec/rubycmd...
<< 1 2 3 ... > >>