ライブラリ
- English (33)
- ビルトイン (111)
- bigdecimal (22)
-
net
/ http (22) - pathname (11)
- rake (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - shellwords (55)
- thread (2)
- uri (11)
-
webrick
/ httputils (11)
クラス
- Array (19)
- BigDecimal (22)
- File (11)
- Pathname (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (39)
モジュール
- FileUtils (11)
- Kernel (66)
-
Net
:: HTTPHeader (22) - Shellwords (33)
- URI (11)
-
WEBrick
:: HTTPUtils (11)
キーワード
-
$ -F (11) -
$ -a (11) -
$ ; (11) -
$ CHILD _ STATUS (11) -
$ FIELD _ SEPARATOR (11) -
$ FS (11) - ConditionVariable (11)
- DOSISH 対応 (11)
- Lazy (11)
- Rubyの起動 (11)
- Shellwords (11)
-
canonical
_ each (11) -
each
_ capitalized (11) - pack (19)
- pack テンプレート文字列 (11)
-
rb
_ parser _ while _ loop (11) - shellsplit (22)
- shellwords (11)
-
split
_ all (11) -
split
_ header _ value (11) -
to
_ f (11) - unpack (11)
検索結果
先頭5件
-
String
# split(sep = $ ; , limit = 0) -> [String] (24416.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。
...第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
ブロックを指定すると、配列を返す代わりに分割した文字列で
ブロックを呼び出します。
第 1 引数 sep は以下......。
: 1 バイトの空白文字 ' '
先頭と末尾の空白を除いたうえで、空白文字列で分割する。
: nil
常に $; で分割する。 $; も nil の場合は、先頭と末尾の空白を除いたうえで、空白文字列で分割する。
: 空文字列 '' あるいは......@param limit 分割する最大個数
@return ブロックを渡した場合は self、ブロックなしの場合は配列
//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(' ')... -
String
# split(sep = $ ; , limit = 0) {|s| . . . } -> self (24416.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。
...第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
ブロックを指定すると、配列を返す代わりに分割した文字列で
ブロックを呼び出します。
第 1 引数 sep は以下......。
: 1 バイトの空白文字 ' '
先頭と末尾の空白を除いたうえで、空白文字列で分割する。
: nil
常に $; で分割する。 $; も nil の場合は、先頭と末尾の空白を除いたうえで、空白文字列で分割する。
: 空文字列 '' あるいは......@param limit 分割する最大個数
@return ブロックを渡した場合は self、ブロックなしの場合は配列
//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(' ')... -
String
# split(sep = $ ; , limit = 0) -> [String] (24415.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。
...第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
第 1 引数 sep は以下のいずれかです。
: 正規表現
正規表現にマッチする部分で分割する。
特に、括弧に......。
: 1 バイトの空白文字 ' '
先頭と末尾の空白を除いたうえで、空白文字列で分割する。
: nil
常に $; で分割する。 $; も nil の場合は、先頭と末尾の空白を除いたうえで、空白文字列で分割する。
: 空文字列 '' あるいは......除く
: limit < 0
分割個数の制限はなし
@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) # =>... -
Shellwords
. split(line) -> [String] (24301.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...った空白区切りの単語分割を行い、
単語 (文字列) の配列を返します。
このメソッドは、Shellwords.#shellsplit の別名です。
@param line 分割の対象となる文字列を指定します。
@return 分割結果の各文字列を要素とする配列を返し... -
Pathname
# split -> Array (24229.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... -
BigDecimal
# split -> [Integer , String , Integer , Integer] (24207.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... -
Shell
# split(pathname) -> [String] (24207.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
Shell
:: CommandProcessor # split(pathname) -> [String] (24207.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
Shell
:: Filter # split(pathname) -> [String] (24207.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
URI
. split(url) -> [String | nil] (24207.0) -
URI を要素に分割した文字列の配列を返します。
...fragment
@param url パースしたい URI を文字列として与えます。
@raise URI::InvalidURIError パースに失敗した場合に発生します。
例:
require 'uri'
p URI.split("http://www.ruby-lang.org/")
#=> ["http", nil, "www.ruby-lang.org", nil, nil, "/", nil, nil, nil]... -
File
. split(pathname) -> [String] (24201.0) -
pathname を dirname とbasename に分割して、2 要 素の配列を返します。
...pathname を dirname とbasename に分割して、2 要
素の配列を返します。
//emlist[][ruby]{
[File.dirname(pathname), File.basename(pathname)]
//}
と同じです。
@param pathname パス名を表す文字列を指定します。... -
Shellwords
. # shellsplit(line) -> [String] (15200.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...列を返します。
空白、シングルクォート (')、ダブルクォート (")、バックスラッシュ (\)
を解釈します。
@param line 分割の対象となる文字列を指定します。
@return 分割結果の各文字列を要素とする配列を返します。
@raise Argum......ートが現れた場合に発生します。
例:
require 'shellwords'
p Shellwords.shellwords(%q{ foo bar "foo bar"\ baz 'foo bar' })
# => ["foo", "bar", "foo bar baz", "foo bar"]
p Shellwords.shellwords(%q{ A B C "D E F" "G","H I" })
# => ["A", "B", "C", "D E F...