別のキーワード
種類
- インスタンスメソッド (106)
- モジュール関数 (36)
- 特異メソッド (36)
ライブラリ
- ビルトイン (88)
- rake (12)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - shellwords (36)
- uri (12)
-
webrick
/ httputils (12)
クラス
- Array (21)
- File (12)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (55)
モジュール
- FileUtils (12)
- Shellwords (36)
- URI (12)
-
WEBrick
:: HTTPUtils (12)
キーワード
- pack (21)
- partition (12)
- rpartition (12)
- shellsplit (12)
- shellwords (12)
-
split
_ all (12) -
split
_ header _ value (12) - unpack (12)
検索結果
先頭5件
-
String
# split(sep = $ ; , limit = 0) -> [String] (18246.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。
...の制限はなし
@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数
@return ブロックを渡した場合は self、ブロックなしの場合は配列
//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a",......" 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 文字に分割][ruby]{
p 'hi there'.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 だと制限... -
String
# split(sep = $ ; , limit = 0) {|s| . . . } -> self (18246.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。
...の制限はなし
@param sep 文字列を分割するときのセパレータのパターン
@param limit 分割する最大個数
@return ブロックを渡した場合は self、ブロックなしの場合は配列
//emlist[例][ruby]{
p " a \t b \n c".split(/\s+/) # => ["", "a",......" 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 文字に分割][ruby]{
p 'hi there'.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 だと制限... -
String
# split(sep = $ ; , limit = 0) -> [String] (18245.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[正規表現が空文字列にマッチする......場合は 1 文字に分割][ruby]{
p 'hi there'.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 だと制限なく分割、配列末尾の空... -
Shell
# split(pathname) -> [String] (18113.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
Shell
:: CommandProcessor # split(pathname) -> [String] (18113.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
Shell
:: Filter # split(pathname) -> [String] (18113.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
URI
. split(url) -> [String | nil] (18113.0) -
URI を要素に分割した文字列の配列を返します。
...* registry
* path
* opaque
* query
* fragment
@param url パースしたい URI を文字列として与えます。
@raise URI::InvalidURIError パースに失敗した場合に発生します。
例:
require 'uri'
p URI.split("http://www.ruby-lang.org/")
#=> ["http", nil, "www.ru... -
File
. split(pathname) -> [String] (18107.0) -
pathname を dirname とbasename に分割して、2 要 素の配列を返します。
...pathname を dirname とbasename に分割して、2 要
素の配列を返します。
//emlist[][ruby]{
[File.dirname(pathname), File.basename(pathname)]
//}
と同じです。
@param pathname パス名を表す文字列を指定します。... -
Shellwords
. split(line) -> [String] (18107.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...空白区切りの単語分割を行い、
単語 (文字列) の配列を返します。
このメソッドは、Shellwords.#shellsplit の別名です。
@param line 分割の対象となる文字列を指定します。
@return 分割結果の各文字列を要素とする配列を返します... -
FileUtils
# split _ all(path) -> Array (6113.0) -
与えられたパスをディレクトリごとに分割します。
...与えられたパスをディレクトリごとに分割します。
@param path 分割するパスを指定します。
例:
split_all("a/b/c") # => ['a', 'b', 'c']... -
WEBrick
:: HTTPUtils . # split _ header _ value(str) -> Array (6107.0) -
HTTP ヘッダの値を分割して返します。
...HTTP ヘッダの値を分割して返します。
@param str HTTP ヘッダの値を返します。... -
Shellwords
. # shellsplit(line) -> [String] (6106.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...配列を返します。
空白、シングルクォート (')、ダブルクォート (")、バックスラッシュ (\)
を解釈します。
@param line 分割の対象となる文字列を指定します。
@return 分割結果の各文字列を要素とする配列を返します。
@raise Ar...