1件ヒット
[1-1件を表示]
(0.083秒)
別のキーワード
ライブラリ
- ビルトイン (1)
検索結果
-
String
# split(sep = $ ; , limit = 0) -> [String] (538.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...