ライブラリ
- English (33)
- ビルトイン (89)
- bigdecimal (22)
-
net
/ http (22) - pathname (11)
- rake (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - shellwords (22)
- thread (2)
-
webrick
/ httputils (11)
クラス
- Array (19)
- BigDecimal (22)
- File (11)
- Pathname (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (50)
モジュール
- FileUtils (11)
- Kernel (33)
-
Net
:: HTTPHeader (22) - Shellwords (22)
-
WEBrick
:: HTTPUtils (11)
キーワード
-
$ CHILD _ STATUS (11) -
$ FIELD _ SEPARATOR (11) -
$ FS (11) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - ConditionVariable (11)
- DOSISH 対応 (11)
-
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Rubyの起動 (11)
-
canonical
_ each (11) -
each
_ capitalized (11) - pack (19)
- pack テンプレート文字列 (11)
- partition (11)
-
rb
_ parser _ while _ loop (11) - rpartition (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - shellsplit (11)
- shellwords (11)
-
split
_ all (11) -
split
_ header _ value (11) -
to
_ f (11) - unpack (11)
検索結果
先頭5件
-
Pathname
# split -> Array (27329.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] (27307.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
BigDecimal
# split -> [Integer , String , Integer , Integer] (27219.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] (24596.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。
...第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
ブロックを指定すると、配列を返す代わりに分割した文字列で
ブロックを呼び出します。
第 1 引数 sep は以下......ます。
第 2 引数 limit は以下のいずれかです。
: limit > 0
最大 limit 個の文字列に分割する
: limit == 0
分割個数制限はなしで、配列末尾の空文字列を取り除く
: limit < 0
分割個数の制限はなし
@param sep 文字列を......@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 (24596.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。 ブロックを指定すると、配列を返す代わりに分割した文字列で ブロックを呼び出します。
...第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
ブロックを指定すると、配列を返す代わりに分割した文字列で
ブロックを呼び出します。
第 1 引数 sep は以下......ます。
第 2 引数 limit は以下のいずれかです。
: limit > 0
最大 limit 個の文字列に分割する
: limit == 0
分割個数制限はなしで、配列末尾の空文字列を取り除く
: limit < 0
分割個数の制限はなし
@param sep 文字列を......@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] (24595.0) -
第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、 結果を文字列の配列で返します。
...第 1 引数 sep で指定されたセパレータによって文字列を limit 個まで分割し、
結果を文字列の配列で返します。
第 1 引数 sep は以下のいずれかです。
: 正規表現
正規表現にマッチする部分で分割する。
特に、括弧に......ます。
第 2 引数 limit は以下のいずれかです。
: limit > 0
最大 limit 個の文字列に分割する
: limit == 0
分割個数制限はなしで、配列末尾の空文字列を取り除く
: limit < 0
分割個数の制限はなし
@param sep 文字列を......aram 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... -
Shell
# split(pathname) -> [String] (24307.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
Shell
:: Filter # split(pathname) -> [String] (24307.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split... -
File
. split(pathname) -> [String] (24301.0) -
pathname を dirname とbasename に分割して、2 要 素の配列を返します。
...pathname を dirname とbasename に分割して、2 要
素の配列を返します。
//emlist[][ruby]{
[File.dirname(pathname), File.basename(pathname)]
//}
と同じです。
@param pathname パス名を表す文字列を指定します。... -
FileUtils
# split _ all(path) -> Array (21319.0) -
与えられたパスをディレクトリごとに分割します。
...与えられたパスをディレクトリごとに分割します。
@param path 分割するパスを指定します。
例:
split_all("a/b/c") # => ['a', 'b', 'c']... -
WEBrick
:: HTTPUtils . # split _ header _ value(str) -> Array (18301.0) -
HTTP ヘッダの値を分割して返します。
...HTTP ヘッダの値を分割して返します。
@param str HTTP ヘッダの値を返します。... -
Kernel
$ $ CHILD _ STATUS -> Process :: Status | nil (12412.0) -
$? の別名
...$? の別名
require "English"
out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`
if $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end...